This is accomplished using the following C style preprocessor commands:
#define
#if
#ifdef
#ifndef
#else
#endif
Notes:
Example:
#define testcode #define mode test #ifdef testcode Call debugModule() #else Call normalModule() #endif #if mode=test Call testCode() #endif
If testcode has been defined, the call to debugModule is compiled. If not, the call to normalModule is compiled.
Also See: Automatic Definitions, #define, #if, #ifdef, #ifndef, #else, #endif, #undefine