Conditional compilation directives provide a way in conditionally process lines of code in a source file. The most common form is #ifdef. The syntax for an ifdef directive is:
#ifdef <identifier>
< statements to be conditionally compiled >
[#else
< statements to be conditionally compiled >]
#endif
where the <identifier> is a macro name which follows the same rules as variable and function names.
The conditional compilation directives are processed by the C preprocessor. When an ifdef is encountered, if the macro specified has been defined previously in the file, the following code is retained in the program. If the macro has not been defined, the code up until the endif is removed from the code passed on to the compiler.
#if <identifier> <op> <value>
< statements to be conditionally compiled >
[#elif
< statements to be conditionally compiled >
...
#else
< statements to be conditionally compiled >]
#endif