Showing posts with label #if. Show all posts
Showing posts with label #if. Show all posts

2.12.2013

Preprocessor directives

The #if directive can be used to test whether an expression evaluates to a nonzero value or not. If the result of the expression is nonzero, then subsequent lines upto a #else, #elif or #endif are compiled, otherwise they are skipped.

Syntax of #if directive as:

#if LABEL == 10
     statement 1;
     statement 2;
#else
     statement 3;
     statement 4;
     statement 5;
#endif