A.5 LISA+ preprocessor statements
LISA+ preprocessor statements have the same syntax and semantics as the corresponding C preprocessor statements.
Define a macro. Macros can have arguments. Converting to strings (# operator) and concatenating (## operator) are supported. The macro is defined in all LISA+ source in the same file that follows the
#definestatement unless it is explicitly
Macros can be redefined several times without warning if the redefinition is identical. Macro expansion is disabled in LISA+ top-level code because of scope. Macros defined on the LISA+ top-level do not affect conditional statements in the
- Undefine a macro. The macro is undefined in all LISA+ code in the same file that follows this statement. It is not an error if the macro was not defined before this statement.
Enable or disable the code enclosed by
#endifblocks, depending on the value of the expression following the
#elifstatements. If the expression evaluates to 0 the code is disabled, for all other values the code is enabled.
Undefined identifiers in the expression have a numerical value of 0. The expression
defined(SYM)evaluates to 1 if the preprocessor symbol
SYMis defined or 0 if it is not defined.
- Shortcuts for the
#if !defined(SYM)statements, respectively.
- Include statements are ignored by the LISA+ preprocessor because of scope. However,
#includestatements in the
includessections of components have the required effect of making the declarations in the header files visible in the behavior code.
- Print the error message that follows the
#errorstatement. Processing of the LISA+ code by the tool is unsuccessful and the tool performs as if an error has occurred.
- Print the warning message that follows the
#warningstatement. Processing of the LISA+ code by the tool is successful and the tool performs as normal.