Conditional Compilation - #endif

Syntax

The preprocessor #endif directive ends the conditional compilation directive.

The following example shows preprocessor conditional compilation directives ended by the #endif directive.

#if defined(LEVEL1)
#   define SIZEOF_INT 16
#   ifdef PHASE2
#     define MAX_PHASE 2
#   else
#     define MAX_PHASE 8
#   endif
#elif defined(LEVEL2)
#   define SIZEOF_INT 32
#   define MAX_PHASE 16
#endif


Preprocessor Directives - An Overview


Conditional Compilation - #if, #elif
Conditional Compilation - #ifdef
Conditional Compilation - #ifndef
Conditional Compilation - #else
Macro Definition and Expansion - #define
Example of Preprocessor Directives