TAL Reference Manual
Procedures
TAL Reference Manual—526371-001
13-21
Label Declaration
2. This example shows FORWARD declarations for entry points:
INT to_this := 314;
PROC add_1 (g2); !FORWARD entry-point
INT .g2; ! identifier declaration
FORWARD;
PROC add_2 (g2); !FORWARD entry-point
INT .g2; ! identifier declaration
FORWARD;
PROC add_3 (g2); !FORWARD procedure
INT .g2; ! declaration
FORWARD;
PROC mymain MAIN; !Main procedure declaration
BEGIN
CALL add_1 (to_this); !Call entry-point identifier
END;
PROC add_3 (g2); !Body for FORWARD procedure
INT .g2;
BEGIN
ENTRY add_2; !Declare entry-point
ENTRY add_1; ! identifiers
INT m2 := 1;
g2 := g2 + m2;
add_2: !Location of entry-point
g2 := g2 + m2; ! identifier ADD_2
add_1: !Location of entry-point
g2 := g2 + m2; ! identifier ADD_1
END;
Label Declaration
The LABEL declaration reserves an identifier for later use as a label within the
encompassing procedure or subprocedure.
identifier
is the identifier of the label. It cannot be a global declaration.
VST1315.vsd
;identifier
,
LABEL