IFDEF | #IFNDEF ... #ENDIF Preprocessor Directive Example

The following example creates a compile-time constant named MYDEFINE. #IFDEF ... #ENDIF displays a message if the compile-time constant has been defined.

#DEFINE MYDEFINE 1

#IFDEF MYDEFINE   
   WAIT WINDOW "MYDEFINE exists"
#ELSE
   WAIT WINDOW "MYDEFINE does not exist"
#ENDIF