HP Pascal/iX Reference Manual (31502-90022)

12- 36
[ . ]
[ . ]
$ELSE$
$IF 'group3'$
[
source_line
]
[ . ] {group3}
[ . ]
[ . ]
$ENDIF$
$ENDIF$
$ENDIF$
INCLUDE
INCLUDE is a System-Dependent MPE/iX and HP-UX Option.
The INCLUDE compiler option includes text from a specified file in the
source code being compiled.
Syntax
$INCLUDE
string_literal
$
Parameter
string_literal
Specifies the name of the file to be included at the
current position in the program. The file specification
depends upon the operating system.
Default None.
Location Anywhere.
The file that contains the INCLUDE option is the
including
file, and the
file specified by
string_literal
is the
included
file.
When the compiler encounters the INCLUDE option, it processes text from
the included file, as if the text were part of the including file. When
the included file ends, the compiler continues processing the including
file, resuming with the line that follows the INCLUDE option; therefore,
ignoring options and source code that follow INCLUDE on the same line).
An included file can contain an INCLUDE option; that is, included files
can be nested. The maximum nesting level is the maximum number of files
that the operating system allows to be open simultaneously.
On the HP-UX operating system, if the file to be included cannot be found
or opened, and its name is not an absolute path name (that is, it does
not start with the character "/"), then the compiler looks for the file
in the following places (this is called the
search path
).
* The directory that contains the .p file being compiled (the main
source file).
* The current working directory.
* The directory /usr/include.
If the file still cannot be found or opened, the compiler issues an error
message and the compile aborts.
NOTE The
pc
option
+C
on HP-UX affects the INCLUDE compiler option (see
the
HP Pascal/HP-UX Programmer's Guide
).