HP Pascal/iX Reference Manual (31502-90022)

12- 39
HP-UX Example
The following program is in a file called /tmp/test.p, and the current
working directory is /users/myself/work.
PROGRAM show_include;
$INCLUDE_SEARCH '../experimental, ../official, /c/official'$
$INCLUDE 'globals'$
BEGIN
END.
The compiler will attempt to find the included file globals by searching
successively in each location specified by the search path. In this
example, the compiler will look for the files listed below in the
following order.
1. In the directory of the including file: /tmp/globals
2. In each element of the include-search path:
/users/myself/experimental/globals
/users/myself/official/globals
/c/official/globals
3. In the current working directory: /users/myself/work/globals
4. In the system standard directory: /usr/include/globals
The search will stop at the first successful attempt to open one of these
files.
If set with INCLUDE_SEARCH, the include-search path becomes part of the
search path used by INCLUDE. Each path specified in the INCLUDE_SEARCH
option denotes a directory in which the compiler will look, in turn, for
an included file. The search stops after the first successful attempt to
open the file.
INLINE
INLINE is an HP Pascal Option.
The INLINE compiler option causes the code for a certain routine to be
duplicated in-line wherever it is called.
Syntax
$INLINE$
Default None.
Location Heading.
The advantage of duplicating routine code in-line is that it eliminates
the overhead of routine calls. Unlike macro expansion, it preserves
call-by-reference parameters as such and allows local parameters. The
disadvantages are that it increases the amount of object code and
prevents recursion: a routine whose code is duplicated in-line cannot
call itself or any other routine that calls it.
Example
PROCEDURE Proc1 (X,Y: Integer) $INLINE$;
.
.
.
PROCEDURE Proc2 $INLINE$