pTAL Conversion Guide

Procedures, Subprocedures, and Procedure
Pointers
pTAL Conversion Guide527302-002
16-10
Declaring PROCPTR Variables
Topics:
Declaring PROCPTR Variables on page 16-10
Declaring PROCPTRs in Structures on page 16-11
Procedures as Formal Parameters on page 16-13
Assigning Values to PROCPTR Variables on page 16-14
Declaring PROCPTR Variables
You declare PROCPTR variables using the following syntax:
procptr
is as described previously in this section.
prev-identifier
is the identifier of a previously declared variable. For a TNS process, prev-
identifier must be 16 bits. For a native process, prev-identifier must be
32 bits or wider.
procaddr
is a constant or dynamic expression of type PROCADDR. procaddr must be the
name of a procedure, procedure pointer, or PROCADDR variable. If procaddr is
a procedure or procedure pointer, the parameters of procptr and procaddr
must match and the following procedure attributes must match: EXTENSIBLE,
VARIABLE, RETURNSCC, MAIN, and INTERRUPT; the following procedure
attributes do not have to match: OVERFLOW_TRAPS, CALLABLE, PRIV, and
RESIDENT.
You can declare a PROCPTR anywhere a data declaration is valid. For purposes of
declarations, PROCPTRs are treated as data, not as procedures.
The address type of a PROCPTR is PROCADDR.
The address type of a PROCADDR variable is WADDR.
The object data type of a reference to a function PROCPTR is the data type returned
by the PROCPTR.
;
VST714.vsd
=
:=
prev-identifier
procaddr
procptr