NET/MASTER Network Control Language (NCL) Programmer's Guide
The Structure of an NCL Procedure
Initial NCL Procedure Development
106160 Tandem Computers Incorporated 4–11
The following screen shows the results of executing the procedure:
(10:21) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0402N
19 is an odd number
17 is an odd number
19 is an odd number
17 is an odd number
15 is an odd number
... and only appears once!
13 is an odd number
... and only appears once!
11 is an odd number
... and only appears once!
NNM1005 START ZEX0402N PROCESSING COMPLETE. NCLID 000039
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
Note Since you can nest NCL procedures and functions, you can nest labels. It is convenient to refer to labels
at the same level as peers, to those at higher nesting levels as parents, grandparents, and so on, and to
those at lower nesting levels as children, grandchildren, and so on. It is good practice to use unique
labels at each nesting level.
See Section 5, “Controlling Execution Flow,” for more information on labels and the
DO, END, GOSUB, GOTO, ITERATE, LEAVE, SELECT, and SIGNAL LABEL core
statements. See Section 6, “Procedures and Functions,” for more information on labels
and the CALL, END, FUNCTION, and PROCEDURE core statements.
The Scope of Label Name Spaces
There are two logically distinct label name spaces accessible from within any NCL
procedure or function.
There is a label name space for the labels of any PROCEDURE or FUNCTION core
statement. The name space for labels of any PROCEDURE or FUNCTION core
statement spans procedure or function boundaries within the entire source file and
any file that you want to include within the current procedure (using the
%%INCLUDE compiler directive).
Labels of a PROCEDURE core statement and a FUNCTION core statement must be
unique at the same nesting level, that is, they must be unique as peers under a given
parent (including the parent itself).
There is a label name space for labels of every other statement that can use labels.
These are labels that are the targets of the DO, END, GOSUB, GOTO, ITERATE,