NET/MASTER Network Control Language (NCL) Reference Manual

Variable Name Substitution
Variables
106126 Tandem Computers Incorporated 9–13
Stem Variable Substitution If a stem variable is referred to through a simple variable name, no substitution is
required.
If a stem variable is referred to through a complex variable name, the period (.) is
placed into the substitution buffer and the rest of the variable is processed according to
the substitution rules described in “Complex Variable Substitution.”
Compound Variable
Substitution
Compound variable name substitution proceeds from right to left, as shown in the
following steps:
1. The current (final or middle) substem is analyzed from right to left:
a. If the substem is a constant, it is prefixed to any value in the substitution
buffer.
b. If the substem is not a constant:
1) The trailing variable reference is looked up according to the substitution
rules for simple, complex, or nested variable names.
2) This value is prefixed to the content of the substitution buffer.
3) Any constant prefix is prefixed to the content of the substitution buffer.
2. Look for the next substem.
a. If there is another preceding substem:
1) The period (.) preceding the substem being processed is prefixed to the
content of the substitution buffer.
2) Processing continues with the next preceding substem, according to
Step 1.
b. If there is no other preceding substem, processing continues according to
Step 3.
3. The stem is analyzed from right to left:
a. If the stem is a constant, it is prefixed to the value in the substitution buffer.
b. If the stem is a simple variable name, it is prefixed to the content of the
substitution buffer.
c. If the stem is a complex variable name, it is processed according to the
substitution rules described in “Complex Variable Substitution.”
d. The stem is validated as a simple variable name and converted to uppercase.
No validation is performed on the resulting final value of any substem after
substitution processing of the substem. This means that:
Uppercase and lowercase letters are case-sensitive if they are substituted in.
Any characters can be substituted, including unprintable characters.
Leading and trailing blanks are significant.