HP C/iX Reference Manual (31506-90011)
102 Chapter7
Preprocessing Directives
Recommendations for Using Include Files
It is important to note that a fully qualified formal designator is required for the file to be
successfully equated, as the preprocessor builds a fully qualified file name before
attempting an open. The exception to this rule is when the preprocessor opens a file using
a -I option that only specifies a group. If a file equation and this type of -I option are both
needed to find a file, it is likely that the file could be moved to a more effective location and
a simpler searching strategy used.
For the source file FILE2.MYGRP.OURACCT that needs a general header file called OURDEFS,
put OURDEFS in H.OURACCT and use:
#include "OURDEFS.H"
or use:
#include "OURDEFS"
in FILE2.MYGRP.OURACCT . The first form is more restrictive because it finds the file before
the -I options are examined. The second allows a -Igrp.acct specification to be used to
include a different set of header files.
In summary, the best overall strategy is to locate your include files in the appropriate
groups and accounts and use FILE commands and the -I compiler option to handle
exceptional cases.