Conditional Preprocessor Directives

Conditional directives let you control whether compilation includes a block of code. These directives let you make multiple builds that are slightly different.

You must use conditional directives together to form a complete block. Several conditional directives are variations of .if that make it easier to establish blocks that test strings for equality, test whether a symbol is defined, and so on.

Note: You can use the C/C++ preprocessor format to specify these conditional directives:

#if #ifdef #ifndef

#else #elif #endif

With two exceptions, these directives function identically whether their starting character is a pound sign (#) or a period. The exceptions are:

  1. You cannot use the pound sign format in a macro.
  2. The period form of #elif is .elseif.

The conditional preprocessor directives are: