#ifdef, #ifndef, #if, #else, #elif, #endif

#ifdef, #ifndef, #if, #else, #elif, #endif

Overview

Used for conditional compiling using macros.
#if and #elif also support the following evaluation formulae.

Errors are generated when undefined macros are used in evaluation formulae.

Code Example

#define USE_FUNCTION_A
#ifdef  USE_FUNCTION_A
    FunctionA:
        ...
#endif


#if (defined(AAA) && (BBB == 1))
    ...
#endif

Revision History

2011/12/20
Initial version.

CONFIDENTIAL