Defined conditions
A defined condition expression tests whether a compilation variable is defined.
- compilation-variable-name-1
- Must not be the same as a conditional compiler directive keyword.
- IS DEFINED
- A defined condition that uses the IS DEFINED syntax evaluates
to TRUE if the compilation-variable-name-1 is defined.
If a defined condition references a compilation variable that was defined via a DEFINE compiler option, but preceding the defined condition in the program there is neither a corresponding DEFINE directive with the AS PARAMETER phrase nor a DEFINE directive without the OFF phrase for the compilation variable, then the defined condition for the compilation variable evaluates to FALSE.
- IS NOT DEFINED
- A defined condition that uses the IS NOT DEFINED syntax evaluates
to TRUE if the compilation-variable-name-1 is not
defined.
A compilation variable whose most recent definition is via a DEFINE directive with the OFF phrase is considered to be not defined.