Google
 
Webcprogramming.com




An Affiliate of AIHorizon




#if

#if <value>
/* code to execute if this value is true */
#elsif lt;value>
/* code to execute if this value is true */
#else
/* code to execut otherwise
#endif
#if checks whether the value is true (in the C and C++ sense of everything but 0) and if so, includes the code until the closing #endif. If not, that code is removed from the copy of the file given to the compiler prior to compilation (but it has no effect on the original source code file). There may be nested #if statements. It is common to comment out a block of code using the following construction because you cannot nest multi-line comments in C or C++.
#if 0
/* code */
#endif


-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.

Geodesy Designs