HP Pascal/iX Programmer's Guide (31502-90023)
7- 22
The call p(a) passes two hidden parameters to p, one for each nested
conformant array dimension. Including hidden parameters ( highlighted),
the parameter list that appears in the preceding program as p(a) is:
-------------------------
| |
| Address of
a
|
| |
-------------------------
| |
| Value 1 (lb1) |
| |
-------------------------
| |
| Value 3 (ub1) |
| |
-------------------------
| |
| Value 1 (lb2) |
| |
-------------------------
| |
| Value 8 (ub2) |
| |
-------------------------
| |
| (UB2-LB2+1) *(UB3) |
| |
-------------------------
| |
| Value 1 (lb3) |
| |
-------------------------
| |
| Value 4 (ub3) |
| |
-------------------------
| |
| (UB3) |
| |
-------------------------
Routine Parameters
If a routine has routine parameters, its physical parameter order
contains one hidden parameter for each routine parameter. (This is not
true of parameters that are routine variables.) These hidden parameters
are at the end of the physical parameter order, in the same order as
their corresponding routine parameters. The value of a hidden parameter
for a specific routine parameter is the static link. This static link
allows access to the variables and parameters of the enclosing routines.
NOTE Level one routines do not require static links. Therefore, they
are the only type of routine parameters that can be passed to
extensible parameters.
Example
PROGRAM prog (input,output);
PROCEDURE p (PROCEDURE param1 (x : integer);
PROCEDURE param2 (y : integer);
FUNCTION param3 (z : integer) : integer;
v : integer);