Specifies that a set of commands is included at compile time when the ConstantName is defined.
The following items describe how a set of commands is included at compile time when you include #IFDEF:
If ConstantName is defined, the set of commands following #IFDEF and preceding #ELSE or #ENDIF (whichever occurs first) is included at compile time.
If ConstantName is not defined and #ELSE is included, the set of commands following #ELSE and preceding #ENDIF is included at compile time.
If ConstantName is not defined and #ELSE is not included, no commands within the #IFDEF ... #ENDIF structure are included at compile time.
#IFNDEF
Specifies that a set of commands is included at compile time when the ConstantName is not defined.
The following items describe how a set of commands is included at compile time when you include #IFNDEF:
If ConstantName is not defined, the set of commands following #IFNDEF and preceding #ELSE or #ENDIF (whichever occurs first) is included at compile time.
If ConstantName is defined and #ELSE is included, the set of commands following #ELSE and preceding #ENDIF is included at compile time.
If ConstantName is defined and #ELSE is not included, no commands within the #IFNDEF ... #ENDIF structure are included at compile time.
ConstantName
Specifies the compile-time constant whose existence determines whether a set of commands is included at compile time. Compile-time constants are defined with #DEFINE.
Commands
Specifies the set of commands that is included at compile time.
The following example creates a compile-time constant named MYDEFINE. #IFDEF ... #ENDIF displays a message if the compile-time constant has been defined.