NXC Version 1.2.1 r5
Conditional compilation works similar to the C preprocessor's conditional compilation.
The following preprocessor directives may be used:
|#ifdef symbol||If symbol is defined then compile the following code|
|#ifndef symbol||If symbol is not defined then compile the following code|
|#else||Switch from compiling to not compiling and vice versa|
|#endif||Return to previous compiling state|
|#if condition||If the condition evaluates to true then compile the following code|
|#elif||Same as #else but used with #if|
See the NXTDefs.h and NXCDefs.h header files for many examples of how to use conditional compilation.