NET/MASTER Network Control Language (NCL) Programmer's Guide

The Structure of an NCL Procedure
Initial NCL Procedure Development
106160 Tandem Computers Incorporated 4–7
Labels are case-insensitive. This means all lowercase alphabetic characters in labels
are translated to uppercase. This includes quoted labels. The following labels are
interpreted by NCL to be the same:
abc:
"abc":
'abc':
ABC:
"ABC":
'ABC':
You can prefix a statement with one or more labels. These label combinations can be
on different lines or the same line. You do not have to follow a label by a statement
terminator. You can refer to LABEL1, LABEL2, LABEL3, LABEL4, or LABEL5 in the
following example to execute the statement SAY "hello, world":
LABEL1:;
LABEL2:;
LABEL3:LABEL4:LABEL5:SAY "hello, world"
The core statements that can use labels in various ways include the following:
CALL
DO
END
FUNCTION
GOSUB
GOTO
ITERATE
LEAVE
PROCEDURE
SELECT
SIGNAL LABEL
A label can be the destination of a GOTO, GOSUB, SIGNAL LABEL, or CALL core
statement, or for a user-written function reference. The following example shows how
you can use a label after the GOTO statement to jump to a segment of code:
GOTO this_label
/* If this_label: is not found, NCL falls through to the
statement following this comment. */
this_label:
/* This is the segment of code to which the GOTO jumps */
Note The label that marks the segment of code has a colon. The label specified by a core statement—in this
example it is GOTO—does not have a colon.