The #define Conditional Directive

The #define compiler directive defines an identifier for a source file containing one or more class definitions. When the identifier is defined, it is implicitly set to the value true. The processing of identifier definitions is top-down; for example, if the line #if DEBUG appears before the #define DEBUG then it will be evaluated as false.

Any #define directives must appear at the beginning of a source file, before anything else except comments or other conditional compilation directives.

Syntax

#define <identifier>

Note that the Visual J++ Build Manager does not allow per-file build settings. This means that in order to turn on and off conditional identifiers within a single source file, the #define and #undef directives must be used.