#IFDEF
#IfDef
See Also: Define Command, #IfNDef
Purpose
The #IfDef command allows you to specify conditionally compiled code based on whether a symbol has been typed (or defined). This compiler directive does the opposite of the #IfNDef compiler directive.
You can configure conditional variables defined in your code in the Studio via the Conditionals tab page on the Configure Workspace dialog.
Syntax
#IfDef {symbol}
{code to compile if symbol is typed}
#Else
{code to compile if symbol is not typed}
#EndIf
What It Does
Any symbolic name that has a valid ICODE equivalent in the compiler's substitution table is said to be typed; any symbolic name that has no ICODE equivalent is said to be untyped.
Any file element, label, or variable that you have declared is considered to be typed and would test true when given as an argument to #IfDef. On the other hand, a symbolic name such as RAZZO is meaningless to the compiler if it has not been declared as a variable, label, or some other type of data, and would cause the #IfDef to test false.