NET/MASTER Network Control Language (NCL) Reference Manual
Variable Lists Beginning With VARS
Verb Syntax and Variable Access Methods
11–12 106126 Tandem Computers Incorporated
How a Variable Name is Constructed
The variable specification in
ranged-variable-specification
can be of any
variable type: simple, complex, stem, compound, or nested. If the variable
specification contains more than a single ampersand, NCL uses variable substitution to
determine the final form of the name before adding numeric suffixes.
Here is an example in which NCL determines the final form of the complex variable
name before suffixing the names with 1 through 64.
PAUSE VARS=(&&A*,&&B*,&&C*)
If the value of &A is NAME, the value of &B is ADDRESS, and the value of &C is
PHONE, then the result of variable substitution is:
PAUSE VARS=(&NAME*,&ADDRESS*,&PHONE*)
Refer to Section 9, “Variables,” for additional information on variable name
substitution.
Start and End Values
Start and end values in a range specification can be constants or expressions.
Constants must be integers from 1 through 999999. Expressions must resolve to
integers in this range. The end value must be greater than or equal to the start value of
the range.
Start and end values are separated by a comma (,). The end value is terminated by a
mismatched closing parenthesis. You must specify both a start and an end value in a
range specification. You cannot omit either value.
Here are some examples of start and end values:
What You Type Comment
(1,1) Start value is 1; end value is 1.
(1,5) Start value is 1; end value is 5.
(12,21) Start value is 12; end value is 21.
(&start,&end) Start value is the value of &start; end value is the value of
&end.
(&start+1,&end-1) Start value is the value of (&start+1); end value is the value of
(&end-1).
(&a+func(a,b),&last) Start value is the value of (&a+func(a,b)) where func(a,b) is a
function call; end value is the value of &last.
If you do not specify the start and end values, NCL uses the default values of 1 and 64,
respectively.
Note An important efficiency consideration: if you know how many variables you need, specify the exact
number with the RANGE keyword. This saves NCL deleting the excess variables.