pTAL Guidelines for TAL Programmers
Differences Between TAL and pTAL
pTAL Guidelines for TAL Programmers—527256-002
3-14
Declaring Procedure Pointer Structure Fields
Declaring Procedure Pointer Structure Fields
You can declare procedure pointer fields in structure declarations. Use the following 
syntax:
procptr
is a procedure pointer declaration as previously defined in this section.
prev-identifier
is the identifier of a field in the same structure or substructure as procptr and at 
the same structure level.
prev-identifier must be a procedure pointer or a PROCADDR variable.
To reference elements of array s in Example 3-5 on page 3-14, use an index:
CALL s[3].f(3.0e1);
Example 3-6
 on page 3-15 declares a template structure with three components. The 
TAL and native compilers allocate space only for procedure pointer f. They do not 
allocate space for g or h because g and h redefine f. Procedure pointers f, g, and h 
are the same except for the data type of the parameter passed to the procedure:
Example 3-5. Procedure Pointer in Array
STRUCT s [0:9];
BEGIN
 REAL PROCPTR f(x);
 REAL x;
 END PROCPTR;
END;
;
VST715.vsd
=
procptr
prev-identifier










