HP Pascal/iX Reference Manual (31502-90022)

12- 65
modulename_procedurename
instead of
procedurename
when linking a program.
The name
modulename_procedurename
is in lowercase letters (as far as the
linker is concerned) unless the procedure was compiled with the compiler
option UPPERCASE ON.
The S300_EXTNAMES option applies to the entire module, but not to other
modules in the same compilation unit. If a compilation unit contains
several such modules, each one must contain the S300_EXTNAMES option.
The purpose of this option is to allow non-Pascal source code that calls
external procedures that are in a Pascal module to be ported from, or be
common with, HP9000 Series 300 source code, without changing the source
code. The HP9000 Series 300 prefixes
modulename_
to
procedurename
in
forming the link name; HP Pascal does not.
Example
MODULE M1;
$S300_EXTNAMES ON$
EXPORT
VAR
V1 : INTEGER;
PROCEDURE P1 (P : CHAR);
IMPLEMENT
.
.
.
END;
MODULE M2;
EXPORT
VAR
V2 : INTEGER;
PROCEDURE P2 (P : INTEGER);
IMPLEMENT
.
.
.
END;
The external names for V1, P1, V2, and P2 are M1_V1, M1_P1, V2, and P2,
respectively.
SEARCH
SEARCH is an HP Pascal Option.
The SEARCH compiler option specifies one or more files for the compiler
to search for module definitions. The files can be:
* Created with the MLIBRARY compiler option.
* Object files into which the modules were compiled (without the
MLIBRARY compiler option).
* Archives (.a files) of such object files. On MPE/iX, these are RL
files created by the Link Editor using such object files.
You must use the SEARCH option when a module being imported is not
defined within the same compilation unit as the IMPORT statement.
Syntax
$SEARCH
string
[,
string
]...$
Parameter
string
Has value of the form: