Evaluates a preprocessor-style expression with macro substitution. Tokenizes the input expression, expands macros where appropriate, parses it according to operator precedence, and computes the integer result. Returns .true. if evaluation succeeded and the result is non-zero.
Constructor
| [in] | expr | Expression string to evaluate |
| [in,out] | macros | Array of defined macros for substitution and defined() checks |
| [out] | val | (optional) integer result of the evaluation |
Constructor
| [in] | expr | Expression string to evaluate |
| [in,out] | macros | Array of defined macros for substitution and defined() checks |
| [in] | ctx | Current context |
| [out] | val | (optional) integer result of the evaluation |
Definition at line 171 of file operators.f90.
| logical function evaluate_expression_default | ( | character(*), intent(in) | expr, |
| type(macro), dimension(:), intent(inout), allocatable | macros, | ||
| integer, intent(out), optional | val ) |
Evaluates a preprocessor-style expression with macro substitution. Tokenizes the input expression, expands macros where appropriate, parses it according to operator precedence, and computes the integer result. Returns .true. if evaluation succeeded and the result is non-zero.
| [in] | expr | Expression string to evaluate |
| [in,out] | macros | Array of defined macros for substitution and defined() checks |
| [out] | val | (optional) integer result of the evaluation |
Definition at line 189 of file operators.f90.
| logical function evaluate_expression_with_context | ( | character(*), intent(in) | expr, |
| type(macro), dimension(:), intent(inout), allocatable | macros, | ||
| type(context), intent(in) | ctx, | ||
| integer, intent(out), optional | val ) |
Evaluates a preprocessor-style expression with macro substitution. Tokenizes the input expression, expands macros where appropriate, parses it according to operator precedence, and computes the integer result. Returns .true. if evaluation succeeded and the result is non-zero.
| [in] | expr | Expression string to evaluate |
| [in,out] | macros | Array of defined macros for substitution and defined() checks |
| [in] | ctx | Context |
| [out] | val | (optional) integer result of the evaluation |
Definition at line 212 of file operators.f90.