pTAL Conversion Guide

Procedures, Subprocedures, and Procedure
Pointers
pTAL Conversion Guide527302-002
16-6
pTAL
pTAL
In pTAL, variable and extensible procedures are implemented as extensible
procedures; therefore, you can declare procedures variable or extensible but the effect
is the same.
Procedure Pointers
Procedure pointers enable you to:
Dynamically select a procedure to call
Call variable and extensible procedures without explicitly building a parameter
mask word
The syntax of procedure pointers is similar to the syntax of forward procedures;
however, instead of the keyword PROC, you declare a procedure pointer using the
keyword PROCPTR. As with a forward procedure, a procedure pointer fully specifies
the procedure’s attributes and formal parameters but has no body—a procedure
pointer does not include executable statements.
You can declare procedure pointers as:
Variables
Formal parameters
Structure fields
The syntax for a PROCPTR is as follows:
return-type
is any of:
STRING
INT
INT(32)
REAL
REAL(64)
UNSIGNED( width )
return-type
PROCPTR
procptr-name
formal-param-spec
formal-param-names
attributes ;
END
PROCPTR
VST600.vsd