$IFDEF Statement

Controls conditional compilation of source code.

Syntax

$IFDEF symbol
    statement
    .
    .
    .
{
$ELSE
    statement
    .
    .
    .}

$ENDIF

Syntax Elements

symbol The name of a symbol.

statement Any valid DataBasic statement.

Conditions

When the module is compiled:

Comments

Any number of valid DataBasic statements can be included or excluded following a $IFDEF or $ELSE.

The $IFDEF statement (with or without $ELSE) must be terminated with $ENDIF.

See Also

$IFNDEF statement, $DEFINE statement, EQUATE statement, $UNDEFINE statement.

Example

$IFDEF DEBUG
PRINT COUNT, MYVALUE
$ENDIF

If the symbol DEBUG has been defined, code that prints the values of the COUNT and MYVALUE variables is included; otherwise this line is omitted.