@@ -64,21 +64,17 @@ call me%destroy()
64
64
65
65
### Error handling
66
66
67
- Errors are reported using the ` error_msg ` output of the ` parse ` and ` evaluate `
68
- methods. This is variable of type ` list_of_errors ` , which is also exported
69
- by the ` function_parser ` module.
67
+ Errors can be reported by both the ` parse ` and ` evaluate `
68
+ class methods. To check for errors, use the ` error ` method, and to print them use the ` print_errors ` method:
70
69
71
- * An error in the function parsing step leads to a detailed error message
72
- (Type and position of error) returned in the ` error_msg ` output of the
73
- ` parse ` method.
74
-
75
- * An error during function evaluation returns a function value of 0.0 and
76
- an error message returned in the ` error_msg ` output of the
77
- ` evaluate ` method.
70
+ ``` fortran
71
+ if (me%error()) then
72
+ me%print_errors(output_unit)
73
+ end if
74
+ ```
78
75
79
- To check if a ` list_of_errors ` class contains a message, use the
80
- ` has_errors ` method.
81
- The ` print ` method can also be used to print the error messages.
76
+ An error in the function parsing step leads to a detailed error message
77
+ (type and position of error). An error during function evaluation returns a function value of 0.0.
82
78
83
79
### Function string syntax
84
80
@@ -125,5 +121,6 @@ by a valid exponent.
125
121
from [ here] ( http://fparser.sourceforge.net ) .
126
122
* The function parser concept is based on a C++ class library written by
127
123
Juha Nieminen < warp@iki.fi > available from [ here] ( http://warp.povusers.org/FunctionParser/ ) .
128
- * The code has been updated to Fortran 2008 by Jacob Williams. Development
124
+ * The original code has been updated to Fortran 2008 by Jacob Williams. Development
129
125
continues on [ GitHub] ( https://github.com/jacobwilliams/fortran_function_parser ) .
126
+ * Note that another refactoring of the original code is available [ here] ( https://github.com/jacopo-chevallard/FortranParser ) .
0 commit comments