TAL Reference Manual

Procedures
TAL Reference Manual526371-001
13-14
Usage Consideration
local-decl
is a declaration for one of:
Simple variable
Array (direct, indirect, or read-only)
Structure (direct or indirect)
Simple pointer
Structure pointer
Equivalenced variable
LITERAL
DEFINE
Label
Entry point
FORWARD subprocedure
subproc-decl
is a subprocedure declaration, as described in Subprocedure Declaration on
page 13-15.
statement
is any statement described in Section 12, Statements.
Usage Consideration
Section 11, “Using Procedures,” in the TAL Programmer’s Guide describes:
How the compiler allocates storage for procedures and their parameters
How you call procedures
Examples of Procedure Declarations
1. This example shows two procedures, the second of which calls the first:
INT c; !Global declaration
PROC first;
BEGIN !Procedure body
INT a, !Local declarations
b;
!Lots of code
END;
PROC second;
BEGIN !Procedure body
!Lots of code
CALL first; !Call first procedure
!More code
END;