Inherits string.
Representation of a preprocessor macro.
Construct a new macro definition.
A macro stores its identifier together with the metadata required during expansion:
The type extends string so that the macro name itself behaves as a string value.
Object-like macro:
Function-like macro:
Initializes a new instance of the Macro Expansion class
Constructor
| [in] | name | macro name |
| [in] | val | (optional) value of the macro |
Examples
Creates an initialized Macro Expansion object with the specified name and optional replacement text.
Parameter lists are initialized to empty, variadic expansion is disabled, and direct self-references are marked as cyclic.
| [in] | name | Macro identifier. |
| [in] | val | Replacement text (default: empty). |
Variables | |
| character(:), allocatable | value |
| Value of the macro. | |
| type(string), dimension(:), allocatable | params |
| List of parameter for function like macros. | |
| logical | is_variadic |
| Indicate whether the macro is variadic or not. | |
| logical | is_cyclic |
| Indicates whether the macro has cyclic dependencies or not. | |
| Variables inherited from string | |
| character(:), allocatable | chars |
| Variable length character array. | |