$IFNDEF Statement
Controls conditional compilation of source code.
Syntax
$IFNDEF
symbol
statement
.
.
.
{$ELSE
statement
.
.
.}
$ENDIF
Syntax Elements
symbol The name of a symbol.
statement Any valid DataBasic statement.
Conditions
When the module is compiled:
-
If symbol has not been defined, the statement(s) following $IFNDEF symbol are excluded. If a $ELSE clause is present, the statement(s) following $ELSE are included.
-
If symbol has been defined using the $DEFINE or EQUATE statement, the statement(s) following $IFNDEF symbol are excluded. If a $ELSE clause is present, those following $ELSE are excluded.
Comments
Any number of valid DataBasic statements can be included or excluded following a $IFNDEF or $ELSE.
The $IFNDEF statement (with or without $ELSE) must be terminated with $ENDIF.
See Also
$IFDEF statement, $DEFINE statement, EQUATE statement, $UNDEFINE statement.
Example
$IFNDEF RELEASE
PRINT COUNT, MYVALUE
$ENDIF
If the symbol RELEASE has not been defined, includes code that prints the values of the COUNT and MYVALUE variables; otherwise omits this line.