#if /#ifdef /#ifndef /#else/#end if
Conditional Processing
Directives
8-4
•
The #else directive. begins an alternate block of code that is compiled
if:
The condition tested by #if is false.
The name tested by #ifdef is not defined.
The name tested by #ifndef is defined.
Note that the #else portion of a conditional block is
optional;
if the
#if, #ifdef, or#ifndef test is not successful, then the preprocessor
continues with the code following the #endif.
•
The #endif directive ends a conditional block. Each #if, #ifdef, and
#ifndef directive must have a matching #endif. Conditional compila-
tion sequences can be nested.