pTAL Reference Manual (H06.03+)
Procedures, Subprocedures, and Procedure
Pointers
HP pTAL Reference Manual—523746-005
14-30
Declaring PROCPTR in Structures
The object data type of a reference to a function PROCPTR is the data type returned
by the PROCPTR.
You can equivalence a PROCPTR to any previously declared variable provided that
the width of the previous variable is greater than or equal to the width of the
PROCPTR.
Declaring PROCPTR in Structures
You can declare PROCPTR fields within structure declarations.
procptr
is a pointer identifier.
Example 14-12. PROCPTRs as Variables and Formal Parameters
INT i;
INT .EXT j;
REAL k;
PROCADDR pa;
PROC p (i, j) EXTENSIBLE, CALLABLE; ! Declare PROC p in a
INT i, .EXT j; ! FORWARD declaration
FORWARD;
PROCPTR a (i, j) EXTENSIBLE,CALLABLE; ! Declare PROCPTR a and
INT i, .EXT j; ! initialize it to point
END PROCPTR := @p; ! to PROC p
FIXED PROCPTR b (str : length); ! Declare FIXED PROCPTR b
STRING .str; ! with one
INT length; ! parameter pair
END PROCPTR;
PROCPTR c (p); ! Declare PROCPTR c
REAL PROCPTR p(x); ! with one parameter, p,
REAL x; ! a PROCPTR
END PROCPTR;
REAL PROCPTR d (x); ! Declare REAL PROCPTR d
REAL x; ! with one
END PROCPTR; ! REAL parameter
PROCPTR e(i); ! Declare PROCPTR e
INT i; ! Equivalence e to d
END PROCPTR = d;
;
VST715.vsd
=
procptr
prev-identifier










