pTAL Reference Manual (H06.08+)

Procedures, Subprocedures, and Procedure
Pointers
HP pTAL Reference Manual523746-006
14-7
Procedure Attributes
VARIABLE
means the compiler treats all parameters of the subprocedure as if they are
optional, even if some are required by your code. If you add parameters to the
VARIABLE subprocedure declaration, all procedures that call it must be
recompiled. The following example declares a VARIABLE subprocedure:
SUBPROC v (a, b) VARIABLE;
INT a, b;
BEGIN
! Lots of code
END;
When you call a VARIABLE subprocedure, the compiler allocates space in the
parameter area for all the parameters. The value of the data for a missing
parameter is unspecified.
EXTENSIBLE
lets you add new parameters to the procedure declaration without recompiling its
callers. The compiler treats all parameters of the procedure as if they are optional,
even if some are required by your code. The following example declares an
EXTENSIBLE procedure:
PROC x (a, b) EXTENSIBLE;
INT a, b;
BEGIN
! Do some work
END;
When you call an EXTENSIBLE procedure, the compiler allocates space in the
parameter area for all the parameters. The values of missing parameters are
unspecified.
Declare procedures EXTENSIBLE, but not subprocedures.
count
converts a VARIABLE procedure to an EXTENSIBLE procedure. The count
value is the number of formal parameters in the VARIABLE procedure that you
are converting to EXTENSIBLE. For the count value, specify an INT value in
the range 1 through 15.