NET/MASTER Network Control Language (NCL) Reference Manual

Variable Name Syntax
Variables
9–2 106126 Tandem Computers Incorporated
The compiler delimits a variable by using a blank, a character that does not fall within
this set, or a mismatched closing parenthesis. For an opening parenthesis to be present
as part of a variable name, it must be preceded by an ampersand (&).
The following example shows a variable that is delimited by a mismatched
parenthesis:
&a = (&b + &c) * &d
The closing parenthesis after &c is not part of the variable name; it terminates the
parenthesized expression.
This differs in the following example in which the first closing parenthesis after &c is
part of the variable name because it matches an opening parenthesis:
&a = (&b + &(c)) * &d
The second closing parenthesis after the variable is not part of the variable name; it
terminates the parenthesized expression.
Data Length NCL does not restrict the length of the data that a variable can store. NonStop
NET/MASTER Management Services (MS), however, restricts the length of data to
32,000 bytes.
Name Length The maximum length of a variable name, after substitution processing and excluding
the leading ampersand, is 250 characters.
Data Storage Variables can hold string and/or numeric data. Section 10, “Expressions and
Operators,” discusses the way in which variables hold data and how data is
automatically converted from one type to another.
Variable Name Syntax This subsection discusses the syntax of:
Simple variables
Complex variables
Stem variables
Compound variables
Nested variables
Simple Variables A simple variable provides direct access to data. The general form of a simple variable
is the following:
&
simple
Simple variable names can be any of the characters in Table 9-1 except the ampersand,
period, opening parenthesis, or closing parenthesis.