TAL Programmer's Guide
Using Parameters
Using Procedures
096254 Tandem Computers Incorporated 11–37
If the same identifier appears at the global, local, and sublocal levels, however, local
statements cannot access the global identifier, and sublocal statements cannot access
the local or global identifier:
INT a := 4; !Declare global variables A and B
INT b := 1;
PROC p (a, b);
INT a; !Declare local formal parameters
INT b; ! A and B
BEGIN
INT c; !Declare local variable C
SUBPROC sub2 (b);
INT b; !Declare sublocal formal parameter B
BEGIN
c := b + 5; !Access local C and sublocal B
END; ! (not global or local B)
a := a + b; !Access local A and B (not global
! A and B)
CALL sub2 (a); !Call subprocedure; pass local A
END; ! (not global A)