pTAL Reference Manual (H06.08+)
Built-In Routines
HP pTAL Reference Manual—523746-006
15-2
Parameters
Routines that operate in privileged mode must be specially licensed, because they
might (if improperly written) adversely affect the status of the processor in which they
are running.
The following execute in privileged mode:
•
CALLABLE procedures (that is, procedures declared with the attribute CALLABLE
on page 14-6)
•
PRIV procedures (that is, procedures declared with the attribute PRIV on
page 14-6)
•
Nonprivileged procedures that are called by CALLABLE or PRIV procedures
•
pTAL Privileged Routines on page 15-11
Parameters
Parameters of built-in routines are always passed by value.
Topics:
•
Addresses as Parameters on page 15-2
•
Expressions as Parameters on page 15-3
Addresses as Parameters
If a parameter of a built-in routine is an address, the address must have the correct
address type—whether the parameter is an input parameter, an output parameter, or
both.
In Example 15-1 on page 15-2, the built-in routine $BUILT_IN_1 has one formal
parameter whose data type is BADDR. The corresponding actual parameter must be
either a BADDR variable or the address field of a STRING pointer.
If an output parameter of a built-in routine is an address, the corresponding actual
parameter must not be an indirect array pointer or an indirect structure pointer.
In Example 15-2 on page 15-3, the built-in routine $BUILT_IN_2 has one formal output
parameter whose data type is BADDR.
Example 15-1. Built-In Routine With Address Parameter
BADDR b;
STRING .s;
$BUILT_IN_1(b); ! OK: data type of b is BADDR
$BUILT_IN_1(@s); ! OK: address type of @s is BADDR
$BUILT_IN_1(s); ! ERROR: data type of s is STRING










