NET/MASTER Network Control Language (NCL) Reference Manual
Statement Analysis
Compiler Operation
8–10 106126 Tandem Computers Incorporated
Labels A label that begins a statement is made up of two lexical elements: a symbol or a
quoted string (excluding a hexadecimal or binary string), followed by a colon (:).
Here are some examples of valid labels:
this_is_a_label:
"this_is_a_label":
123456:
"123456":
LABEL_1:
label_17:
ABC1$:
POSITION_1:
LABEL1:LABEL2:LABEL3:
The following table shows some examples of invalid labels:
Invalid Label Reason
label(1): A symbol cannot contain parentheses.
LABEL&1 A symbol cannot contain ampersands.
Begin_Loop:: A label is suffixed by only one colon.
“POSITION1:” The colon must suffix the quoted string.
‘313233343536’x: This quoted string represents a hexadecimal number.
“0011000100110010”B: This quoted string represents a binary number.
Statement Analysis An NCL procedure consists of source lines that make up a collection of statements.
This subsection discusses the different elements that define an NCL statement and the
different types of statements that NCL recognizes. It also describes the difference
between compilation and run-time errors.
Terminating and
Continuing a Statement
A statement is terminated by a semicolon (;). However, to eliminate the need to
explicitly terminate a statement by a semicolon, NCL uses the following conventions:
If a source line does not end with a semicolon, the compiler operates as if the
semicolon is there unless:
The line is part of a comment that continues on to the next line (the comment
is open).
The line is part of a quoted string that continues on to the next line (the quoted
string is open).
Trailing blanks are stripped from lines before parsing, so that trailing blanks
on the line are not part of a quoted string. Leading blanks on the next line,
however, are significant.
The last noncomment lexical element on the line is the line continuation
character (,). In this case, the comma is logically replaced by a blank and no
semicolon is assumed.