HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)
#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.
If the file name is enclosed in angle brackets (< >), the default system directories are
searched to find the named file. If the file name is enclosed in double quotation marks
(“ “), by default, the directory of the file containing the #include line is searched first,
then directories named in -I options in left-to-right order, and last directories on a
standard list.
The arguments to the #include directive are subject to macro replacement before being
processed. Thus, if you use a #include directive of the form #include identifier,
identifier must be a previously defined macro that when expanded produces one
of the above defined forms of the #include directive. Refer to Macro Replacement
(#define, #undef) for more information on macros.
Error messages produced by HP aC++ indicate the name of the #include file where
the error occurred, as well as the line number within the file.
Examples
#include <iostream.h>
#include "myheader.h"
#ifdef MINE
# define filename "file1.h"
#else
# define filename "file2.h"
#endif
#include filename
The #include_next preprocessor directive is similar to the #include directive, but
tells the preprocessor to continue the include-file search beyond the current directory,
and include the subsequent instance found in the file-search path.
Macro Replacement (#define, #undef)
You can define C++ macros to substitute text in your source file.
Syntax
macro-directive ::=
#define identifier [replacement-list]
#define identifier( [identifier-list] ) [replacement-list]
#undef identifier
replacement-list ::=
token
replacement-list token
148 Preprocessing Directives