NET/MASTER Network Control Language (NCL) Reference Manual

Variable Name Syntax
Variables
106126 Tandem Computers Incorporated 9–5
A suffix must start with a nonnumeric character and serves as a delimiter for a
variable name that is numeric.
Restrictions (Rules) for Using Complex Variables
The restrictions that complex variables place on the characters they allow in certain
positions are expressed in the following general rules:
The first simple variable name cannot be numeric; that is, it cannot start with a
digit. It does not have a suffix.
The last simple variable name can be numeric; the suffix is optional.
If any other simple variable name is numeric—that is, other than the first or the
last—it must have a suffix.
An implication of these rules is that the characters between any two ampersands
cannot be all numeric.
Complex Variables and Associate Indexing
A complex variable, with associated indexing, has two parts; the second part is known
as the index. The purpose of the associated index is to simulate arrays. This type of
construction is shown in the next example:
&data&index
In this complex variable, the index part must represent characters that are valid in the
final simple variable name. If, in the preceding example, &index had the value of an
exclamation mark (!), this would result in an illegal simple variable: &data!. The
proper method of simulating an array using complex variables consists of assigning
successive ascending or descending values to the index part. If you assign the values
1,2, …, n to the variable &index, you obtain the variables &data1, &data2, …, &datan,
which are valid simple variables.
If NCL resolves a complex variable to a simple variable that has not been assigned a
value, NCL returns a null value, denoted by a pair of empty quotation marks (“”).
Examples of Complex Variables
Some examples of valid complex variables are:
&&surname
&&&&&&&&&name
&a&b
&abc&&9a
&z1&1$z&x
&a&1b&2
&a&123e&c2
&a{&index}