HP aC++/HP C A.06.25 Programmer's Guide
Usage Guidelines
Following are rules and guidelines for using preprocessor directives:
• A preprocessor directive must be preceeded by a pound sign (#). White-space
characters may precede the # character.
• The # character is followed by any number of spaces and horizontal tab characters
and a preprocessor directive.
• A preprocessor directive is terminated by a newline character.
• Preprocessor directives, as well as normal source lines, can be continued over
several lines. End the lines that are to be continued with a backslash (\).
• Some directives can take actual arguments or values.
• Comments in the source file that are not passed through the preprocessor are
replaced with a single white space character (ASCII character number decimal 32).
Preprocessor directives provide the following functionality:
• Source File Inclusion (#include, #include_next)
• Macro Replacement (#define, #undef)
• Assertions (#assert, #unassert)
• Conditional Compilation ( #if, #ifdef, .. #endif)
• Line Control (#line)
• Pragma Directive (#pragma, _Pragma operator)
• Error Directive (#error)
• Trigraph Sequences
• Warning Directive
Source File Inclusion (#include, #include_next)
You can include the contents of other files within the source file using the #include
or #include_next directives.
Syntax
include-directive ::=
#include <filename>
#include "filename"
#include identifier
include_next-directive ::=
#include_next <filename>
#include_next "filename"
#include_next identifier
Description
The #include preprocessing directive causes HP aC++ to read source input from the
file named in the directive. Usually, include files are named filename.h.
158 Preprocessing Directives