Showing posts with label Conditional compilation. Show all posts
Showing posts with label Conditional compilation. Show all posts

Conditional compilation


One of the most powerful features of the preprocessor is the so-called conditional compilation this  means that portions of the code could be excluded in the actual compilation under the certain conditions. 

This means that your source could contain special code for, say, the ARM processor. Using conditional  compilation, this code could be ignored when compiling for all other processors. 
The preprocessor directives #ifdef, #ifndef, #if, #elif, and #else are used to control the 
source code. 

The #ifdef (#ifndef) directive includes a section if a preprocessor symbol is defined 
(undefined).