NET/MASTER Network Control Language (NCL) Reference Manual

Variable Name Syntax
Variables
106126 Tandem Computers Incorporated 9–3
Alphabetic characters in a simple variable name are case-insensitive. The following
simple variable names are synonymous:
&simple_variable
&SIMPLE_VARIABLE
&SiMpLe_VaRiAbLe
Simple variables restrict the characters they allow in certain positions. If the first
character after the ampersand is a digit, the remainder of the variable name must be
digits. Here is an example of a simple variable name that is valid:
&123
Here is an example of a simple variable name that is invalid:
&123a
The simple variable name &A123A is valid because the first character after the
ampersand is not a digit.
A simple variable name can end with an unsigned number in the range 0 (zero)
through 999999, enclosed in braces ({ }), as in the following example:
&abc{123}
You use the braces as an index when you want to refer to repeated elements in a
mapped data object (MDO) variable. The variable &$MSG.DISPLAY.PREFIX{3} shows
this and refers to the third occurrence of the PREFIX element in an MDO variable.
More examples of valid simple variable names are:
&1
&777
&A
&A12
&ABRACADABRA
&glblname
&LONG_VARIABLE_NAME
&simple
&SIMPLE{50}
Some examples of invalid simple variable names are listed in the following table:
Invalid Simple Variable Reason
&A&B Valid complex variable.
&A. Valid stem variable.
&A.B Valid compound variable.
&(AB) Valid nested variable.
&12A The first character after the ampersand is numeric, but not all characters
are numeric.
&x{1}y Braces must be at the end of the name.
&simple{z} Nonnumeric characters within the braces.
&simple{} Null between braces.