Directive #ifndef Foundation
Compiles code when a symbol is not defined
#ifndef <Symbol> <SourceCode>... [ #else <SourceCode>... ] #endif
The directives #ifndef...#else...#endif form a control structure for the preprocessor. When the preprocessor constant <Symbol> has not been defined previous to the preprocessor encountering the #ifndef directive, the preprocessor translates and outputs the source code located between the directives #ifndef and #elseto the intermediary file. If no #else directive is present, the preprocessor translates and outputs the source code located between the directives #ifndef and #endif.
#ifndef provides support for conditional compilation. The preprocessor translates the source code subsequent to the directive #ifndef only when the preprocessor constant <Symbol> has not been previously defined. If this constant has been defined the preprocessor translates the source code which is between the #elseand #endif directives. Whichever block of code the preprocessor ignores does not get translated and output to the intermediary file, and thus does not get compiled.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.