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

7- 20
p1(v);
p2(v);
END. {prog}
The preceding program prints:
Size of actual parameter = 80
Bit size of actual parameter = 640
Size of formal parameter = 44
Bit size of formal parameter = 352
The procedure p1 does not specify the option UNCHECKABLE_ANYVAR, so it
can access the hidden parameter associated with the actual parameter v.
The functions sizeof(parm) and bitsizeof(parm) return the size of the
actual parameter v.
The procedure p2 specifies the option UNCHECKABLE_ANYVAR, so it cannot
access the hidden parameter associated with the actual parameter v,
because it is omitted from the physical parameter order. The functions
sizeof(parm) and bitsizeof(parm) return the size of the formal parameter
parm (that is, the sizes of the type t2).
Generic String Parameters
If a routine has generic string parameters, its physical parameter order
contains one hidden parameter for each. In the physical parameter order,
each hidden parameter follows its corresponding actual string parameter.
The value of each hidden parameter is the maximum length of the
corresponding actual string parameter.
Extensible Parameter List
If a routine has an extensible parameter list, its physical parameter
order begins with a hidden parameter. The value of the hidden parameter
is the number of actual parameters passed, excluding hidden parameters.
This value is always greater than or equal to the number of nonextension
parameters, because the routine must have a value for each of them.
Example
$STANDARD_LEVEL 'EXT_MODCAL'$
PROGRAM prog;
PROCEDURE p (x : integer;
y : real);
OPTION EXTENSIBLE 1
DEFAULT_PARMS (x := 0,
y := 1.0);
BEGIN
.
.
END;
BEGIN
p; {value of hidden parameter is one}
p(9); {value of hidden parameter is one}
p(9, 2.7); {value of hidden parameter is two}
p(, 2.7); {value of hidden parameter is two}
END.
The procedure p has one nonextension parameter, so the value of the
hidden parameter for any call to p is at least one.
In the first call above, p receives one value from DEFAULT_PARMS; the
value of the hidden parameter is one.
In the second call, p receives one value from the actual parameter list;
the value of the hidden parameter is one.