2.12.2013

Conditional Compilation

What is conditional compilation?
You can understand it by its name i.e. a program is compiling according condition.
In other word, we can, if we want, have the compiler skip over part of a source code by inserting the preprocessing commands #ifdef and #endif, which have the general form:

#ifdef macroname
    statement 1;
    statement 2;
    statement 3;
    statement 4;
#endif

if macroname has been #defined, the block of code will be processed as usual, otherwise not.

No comments:

Post a Comment