HP Pascal/iX Reference Manual (31502-90022)

11- 28
returned if it cannot. This procedure option can be specified only on
level one procedures or functions.
NOTE On implementations that do not support dynamic loading, taking the
address of an unresolved routine always produces NIL, while calling
an unresolved routine is an error.
A procedure or function declared with option UNRESOLVED must not have a
body, and must be declared with the directive EXTERNAL.
Syntax
Example
PROCEDURE product_x
OPTION UNRESOLVED; external;
BEGIN
...
IF (addr( product_x ) <> nil) THEN { }
...
END;
The code above performs a check at run time for the existence of a
hypothetical product that provides the entry point product_x. If the
product does not exist at run time, and, therefore, does not have any of
its entry points installed, then the predefined function addr returns
NIL.
Predefined Routines
The system programming extensions define the following additional
predefined procedures and functions.
Addressing and Pointers
Addr.
The predefined function addr allows the user to create references to
routines or data.
Usage
addr
(variable)
addr
(variable,offset)
addr
(routine-name)
Parameters
variable
A variable or reference parameter, or a component
of an unpacked structured variable or reference
parameter. You can take the address of a component
of a
packed
or
crunched
structure, if the component
begins on a byte-aligned boundary.