pTAL Conversion Guide

pTAL Conversion Guide527302-002
7-1
7 Labels
In TAL and pTAL, a label is the target location of a GOTO statement.
The following guidelines apply to pTAL:
LABEL is not a valid data type for a formal procedure parameter.
A label is not a valid actual procedure parameter.
If a GOTO statement in a subprocedure branches to a label in the containing
procedure, the label must be declared in a LABEL declaration in the containing
procedure.
The executable statement identified by a label cannot be an IF statement that tests
the hardware indicator.
Label Parameters
TAL
LABEL is a valid data type for a formal procedure parameter to which you must pass a
label as the actual parameter.
pTAL
LABEL is not a valid data type for a formal procedure parameter, and you cannot pass
a label to a procedure:
PROC p(lab);
LABEL lab; ! ERROR: Invalid in pTAL: formal parameter
! cannot be declared LABEL
BEGIN
...
END;
PROC p1;
BEGIN
CALL p(lab2);
lab2: ! ERROR: Invalid in pTAL: actual parameter
... ! cannot be a label
END;