HP aC++/HP C A.06.20 Programmer's Guide

Usage Guidelines.........................................................................................................154
Source File Inclusion (#include, #include_next)..........................................................154
Syntax.....................................................................................................................154
Description.............................................................................................................154
Examples................................................................................................................155
Macro Replacement (#define, #undef)........................................................................155
Syntax.....................................................................................................................155
Description.............................................................................................................155
Macros with Parameters.........................................................................................156
Specifying String Literals with the # Operator......................................................157
Concatenating Tokens with the ## Operator .........................................................157
Example 1..........................................................................................................157
Example 2..........................................................................................................158
Using Macros to Define Constants.........................................................................159
Other Macros..........................................................................................................159
Example 1..........................................................................................................160
Example 2..........................................................................................................160
Using Constants and Inline Functions Instead of Macros.....................................160
Example............................................................................................................160
Predefined Macros.................................................................................................161
Assertions (#assert, #unassert).....................................................................................162
Syntax.....................................................................................................................162
Description.............................................................................................................162
Conditional Compilation (#if, #ifdef, .. #endif)...........................................................162
Syntax.....................................................................................................................163
Description.............................................................................................................163
Using the defined Operator...................................................................................163
Using the #if Directive............................................................................................164
The #endif Directive...............................................................................................164
Using the #ifdef and #ifndef Directives..................................................................164
Nesting Conditional Compilation Directives........................................................164
Using the #else Directive........................................................................................164
Using the #elif Directive.........................................................................................164
Examples................................................................................................................165
Line Control (#line)......................................................................................................165
Syntax.....................................................................................................................165
Description.............................................................................................................165
Example..................................................................................................................166
IOSTREAM Performance Improvement Pragma........................................................166
Syntax:....................................................................................................................166
Pragma Directive (#pragma).......................................................................................166
Syntax.....................................................................................................................166
Description.............................................................................................................167
Example..................................................................................................................167
12 Table of Contents