October 2004
Beginner
408 pages
9h 24m
English
Just as you can have conditionals within your C code that may or may not execute code depending on whether a condition is true or false, you can write C preprocessor conditionals. These are directives that instruct the preprocessor to do something (or not do something) based on certain criteria. Unlike your C conditionals, which are checked during execution of an application, C preprocessor conditionals are tested during the preprocessor stage (just before compilation).
There are a number of conditional directives in the C preprocessor (Table 8.1), allowing for relatively intricate examples.
| Conditional Directives | |
|---|---|
| Directive | Effect |
| #if | Includes ... |
Read now
Unlock full access