Open PL/I program blocks may be nested. Rules for naming nested blocks are as follows:
If the block contains the debugger's current evaluation environment, the search for the referenced block begins from the current environment and continues through each successive containing (parent) block until the referenced block is found.
A: proc; /* 1 */ B: proc; /* 8 */ B: proc; /* 2 */ C: proc; /* 9 */ C: proc; /* 3 */ D: proc; /* 10 */ D: proc; /* 4 */ end D; end D; end C; end C; B: proc; /* 11 */ end B; A: proc; /* 12 */ C: proc: /* 5 */ A: proc /* 13 */ B: proc; /* 6 */ B: proc; /* 14 */ C:proc; /* 7 */ end B; end C; end A; end B; end A; end C; end B; end A; end B;
The following describes how each block can be referenced given the current evaluation environment in the external procedure %EXTERN.A (block 1).
Block | |
---|---|
Reference | |
1 | A or %EXTERN.A |
2 | A.B, B, or %EXTERN.A.B |
3 | B.C, A.B.C, or %EXTERN.A.B.C. |
4 | D, C.D, B.C.D, A.B.C.D, %EXTERN.A.B.C.D, B.D, A.B.D, %EXTERN.A.B.D, A.D, or %EXTERN.A.D |
5 | C, A.C, or %EXTERN.A.C |
6 | C.B, A.C.B, or %EXTERN.A.C.B |
7 | C.C, C.B.C, A.C.C, %EXTERN.A.C.C, A.C.B.C, or %EXTERN.A.C.B.C |
8 | %EXTERN.B |
9 | %EXTERN.B.C |
10 | %EXTERN.B.D, or %EXTERN.B.C.D |
11 | B.B or %EXTERN.B.B |
12 | B.B.A or %EXTERN.B.B.A |
13 | B.A.AB.B.A.A, %EXTERN.B.A.A, or %EXTERN.B.B.A.A |
14 | B.B.B B.A.B B.A.A.B, B.B.A.B, %EXTERN.B.B.B, %EXTERN.B.A.B, %EXTERN.B.A.A.B, %EXTERN.B.B.A.B, or%EXTERN.B.B.A.A.B |
If the current evaluation environment is in the internal procedure block %EXTERN.A.B.C.D (block 4), the following is true in the debugger:
If the current evaluation environment is in the external procedure block %EXTERN.B (block 8), the following is true in the debugger: