TAL Reference Manual

Procedures
TAL Reference Manual526371-001
13-23
Examples of Label Declarations
2. In this example, sublocal GOTO statements branch to local labels A and B. The
branch to declared label A is portable to future software platforms; the branch to
undeclared label B is not portable:
PROC p;
BEGIN
LABEL a; !Declare label A
INT i;
SUBPROC s;
BEGIN
!Lots of code
GOTO a; !Branch is portable; label A is declared
GOTO b; !Branch is not portable; label B is not
END; ! declared
!Lots of code
a :
i := 0;
!More code
b :
i := 1;
!Still more code
END;