pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

simple pointer
structure pointer
equivalenced variable
LITERAL
DEFINE
label
entry point
FORWARD subprocedure
subproc-decl
is a subprocedure declaration, as described in Subprocedure Declarations (page 257).
statement
is any statement described in Chapter 12 (page 199).
Example 206 Procedures
INT c; ! Global declaration
PROC first;
BEGIN ! Procedure body
INT a, ! Local declarations
b;
...
END;
PROC second;
BEGIN ! Procedure body
...
CALL first; ! Call first procedure
...
END;
Example 207 FORWARD Declaration for a Procedure
INT g2;
PROC procb (param1); ! FORWARD declaration for procb
INT param1;
FORWARD;
PROC proca;
BEGIN
INT i1 := 2;
CALL procb (i1); ! Call procb
END;
PROC procb (param1); ! Body for procb
INT param1;
BEGIN
g2 := g2 + param1;
END;
Subprocedure Declarations
You can declare subprocedures within procedures, but not within subprocedures.
Subprocedure Declarations 257