DataBasic Reference > Statements and Intrinsic Functions > $IFDEF Statement

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

$IFDEF Statement (DataBasic) (m618703+ifdef_s.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

$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.

RealityV15.0Comment on this topic