HP Pascal/iX Programmer's Guide (31502-90023)

8- 2
NOTE You can pass only level 1 procedures to EXTENSIBLE.
You cannot pass large (greater than 8 bytes) value parameters to an
extension parameter.
Example
PROGRAM prog;
$STANDARD_LEVEL 'EXT_MODCAL'$
VAR
b : boolean;
FUNCTION f (i,j : integer) : boolean
OPTION EXTENSIBLE 2; {both parameters are required}
BEGIN
.
.
END;
PROCEDURE p (x,y : integer)
OPTION EXTENSIBLE 0; {no parameters are required}
BEGIN
.
.
END;
PROCEDURE q (a : integer;
b : real;
c : char;
d : integer)
OPTION EXTENSIBLE 2; {first two parameters are required}
BEGIN
.
.
END;
(
Example is continued on the next page
.)
BEGIN
b := f(36,45); {legal}
b := f(20); {illegal}
b := f(,66); {illegal}
b := f; {illegal}
p; {legal}
p(); {legal}
p(100); {legal}
p(250,13); {legal}
p(,60); {illegal}
q(5,9.4); {legal}
q(4,3.0,'z'); {legal}
q(7,8.8,'w',55); {legal}
q(2,1.1,,93); {illegal}
q(,); {illegal}
q(,,45); {illegal}
q(400,,22); {illegal}
END.
Both parameters of the function f are nonextension parameters. Every
call to f must specify actual parameters for them.
Both parameters of the procedure p are extension parameters. A call to p