pTAL Reference Manual (H06.08+)

Procedures, Subprocedures, and Procedure
Pointers
HP pTAL Reference Manual523746-006
14-13
Formal Parameter Specification
.
.EXT
.SG
.SGX
are indirection symbols (see Indirection Symbols on page 2-7). If present, the
parameter is passed by reference; if absent, the parameter is passed by value.
Specify reference parameters for actual parameters that will be:
Arrays
Structures
Simple variables (when you want to update the original value in the callers
scope)
param-name
is the identifier of a formal parameter. The identifier has local scope if declared in a
procedure or sublocal scope if declared in a subprocedure.
referral
is the identifier of a previously declared structure or structure pointer. The diagram
under param-type describes lists the kind parameter requiring a referral.
REFALIGNED
For simple pointers, the default for REFALIGNED is the value you specify in the
REFALIGNED on page 17-53.
2
specifies that the variables and structures that
identifier
references are aligned as
they would be aligned in TAL (and might not be well-aligned in pTAL).
8
specifies that the variables and structures are well-aligned in pTAL (and in TAL,
that they might have more space).
For nonstructure pointers, the default for REFALIGNED is the value you specify in
the REFALIGNED on page 17-53.
When a procedure is called, each actual parameter is bound to its corresponding
formal parameter. Parameters passed by value must follow the same rules for
assignment compatibility as do assignment statements. Each actual value parameter
corresponds to the right side of an assignment statement.
Table 14-1 on page 14-14 lists the characteristics that you can declare in a formal
parameter specification depending on the kind of actual parameter the procedure or
subprocedure expects.