NET/MASTER Network Control Language (NCL) Reference Manual

Lexical Elements of NCL
Compiler Operation
106126 Tandem Computers Incorporated 8–9
Some examples of using parentheses are shown next:
Example Use of Parentheses
&z = &a * (&b + &c) Alters the order of evaluation in an expression.
&z=(&a*(&d**2)*&b)+&c Delimits terms in an expression to clarify the code.
&z=(&a||&b)(&c,xyz) Delimits an expression that resolves to the name of a local
or external function.
call proc1(a,b,c) Delimits parameters in a procedure call.
&a = func1(1,2,3) Delimits parameters in a function call.
msgread vars=(&a,&b,&c) Delimits items in a list.
signal (label) Delimits a keyword in a statement.
Colon
The colon (:) is used to delimit a label. See “Labels,” later in this section, for more
information.
Semicolon
The semicolon (;) is used to explicitly delimit the end of a statement, as in the
following example:
CMD SHOW USERS;SAY F(1,2,3);
Including the semicolon at the end of a line is optional. See “Terminating and
Continuing a Statement,” later in this section, for more information.
Comments The compiler does not regard a comment as a lexical element. Logically, the compiler
replaces the comment with a blank, which is then a lexical element delimiter.
(Depending on the context, this blank may be a blank operator. This is a special use of
the blank and is discussed in Section 10, “Expressions and Operators.”)
For example, the compiler regards the comment in the following line of code as a
blank:
token1/* This comment is between two tokens */token2
The compiler replaces the comment by a blank to produce the following output:
token1 token2
In this way, comments are effectively ignored by the compilation process.
A comment that spans several source lines causes any compiler control statements in
those source lines to be ignored. The compiler control statements are effectively
hidden within comment delimiters. The following example shows a compiler
directive that is ignored:
/*This is the first line of a comment.
%%INCLUDE …
This is the third line of a comment.*/