NET/MASTER Network Control Language (NCL) Reference Manual
Variable Name Syntax
Variables
9–8 106126 Tandem Computers Incorporated
The following are examples of compound variables (assume, in these examples, that
&I = 1 and &J = 2):
Example Comment
&A.1.5 A simple compound variable reference; no substitution is required.
&A.&I.&J A simple compound variable reference; after substitution, the name is
&A.1.2.
&A.&I.5 A simple compound variable reference; after substitution, the name is
&A.1.5.
&&X.&ABC&3.&D A complex compound variable reference.
Compound variables are also used as the access mechanism to Mapping Services. For
more information on Mapping Services, refer to the NonStop NET/MASTER NCL
Programmer’s Guide.
Nested Variables A nested variable is a variable name introduced by an ampersand (&) and an opening
parenthesis ((), and terminated by a closing parenthesis ()). The general form of a
nested variable is the following:
&(
nest-name
)
nest-name
is a complete variable reference and can include any variable type.
The opening parenthesis of a nested variable can be followed by an ampersand. If the
opening parenthesis is followed by an ampersand, it can be followed by a variable
reference of any type. Some examples are:
Example Comment
&(&123) &123 is a simple variable reference.
&(&a&b) &a&b is a complex variable reference.
&(&abc.) &abc. is a stem variable reference.
&(&A.&I.&J). &A.&I.&J is a complex compound variable reference.
&(&(&A)) &(&A) is a nested variable reference.
If the opening parenthesis is not followed by an ampersand, it can be followed by a
variable name of any type, except another nested variable. Some examples are:
Example Comment
&(123) 123 is a simple variable name.
&(a&b) a&b is a complex variable name.
&(abc.) abc. is a stem variable name.
&(A.&I.&J). A.&I.&J is a complex compound variable name.