MvIFNDEF#
Within an <MvIFNDEF>
block that does not generate code, the compiler still performs syntax and logical parsing of the source, so tags that require end tags (e.g., <MvCALL>
and </MvCALL>
) are still checked and matched.
Syntax
<MvIFNDEF NAME = "string: { expression } | literal">
Attributes#
Attribute | Description |
---|---|
NAME |
Required. The name of a symbolic code passed on the compiler command line. |
Example#
In this example, one set of script will be included in the compiled program if the symbolic code SYMBOL
is not passed on the compiler command line. If SYMBOL
is present then an alternate script will be used instead.
<MvIFNDEF NAME="SYMBOL">
... Script included in the output if SYMBOL is **NOT** set ....
</MvIFNDEF>
<MvIFDEF NAME="SYMBOL">
... Script included in the output if SYMBOL is set ....
</MvIFDEF>
The compiler command line instructs the compiler to include the script in the <MvIFDEF>
block. Optionally other symbols can be set:
mvc -D SYMBOL [-D ANOTHER_SYMBOL] source.mv