Skip to content

#IF_DEFINED

This Compiler Directive  is used to define conditional compilation:

  • The code following the #IF_DEFINED and before #ELSE (or before #END_IF, if #ELSE is not present) is compiled only if symbol is defined (see #DEFINE).
  • If symbol is not defined and the #ELSE directive is present, the code following #ELSE and before #END_IF is compiled instead.

Syntax

1
2
3
4
5
#IF_DEFINED symbol
    // code block
#ELSE
    // code block
#END_IF

See Also