HP Pascal/iX Reference Manual (31502-90022)

12- 38
files.
The command line option -I include-search path also specifies this
option. You can specify multiple paths by repeating the command line
option -I for each path.
syntax
$INCLUDE_SEARCH '[+] [&]
string
[,
string
]...'$
Parameter
Default None.
Location Anywhere.
The
string
parameter specifies a path for the compiler to search for an
included file. This path is called the include-search path. The +
parameter, if specified, appends this new include-search path to the end
of the existing include-search path. If the + parameter is omitted, the
new include-search path replaces the existing one.
Although there is no default search path for INCLUDE on the MPE/iX
operating system, you can define one with the INCLUDE_SEARCH option. You
can modify the name of the included file by appending each component of
the include path to the search path. Using the & symbol, you can
indicate that the compiler should search for the unmodified file name.
Note that the unmodified file name is not searched first by default. In
fact, it will not be searched at all if the & is omitted from the
INCLUDE_SEARCH list. If an INCLUDE_SEARCH list is specified, the
compiler will search
only
the locations specified in the include-search
path.
The search order is:
1. The directory of the immediate including file.
2. The include-search path.
3. The user's current working directory.
4. The system standard location /usr/include.
MPE/iX Example
PROGRAM show_include;
$INCLUDE_SEARCH '&, .exp, .official, .official:indy'$
$INCLUDE 'globals.foo'$
BEGIN
END.
The compiler will attempt to find the included file globals.foo by
looking successively for it under each filename modification specified by
the include path. In this example, the compiler will search successively
for the following files:
* globals.foo
* globals.foo.exp
* globals.foo.official
* globals.foo.official:indy
Note that the compiler attempts to open the unmodified filename
globals.foo only because the first element of the include path is "&".
The search will stop on the first successful attempt to open one of these
files.