NET/MASTER Network Control Language (NCL) Reference Manual

Variable Name Substitution
Variables
9–14 106126 Tandem Computers Incorporated
This means that the resulting value of any substem, after substitution processing, can
be any arbitrary data.
Note The substitution buffer holds the variable name being constructed during substitution processing.
Note also that NCL changes all user-specified variable names to uppercase during compilation.
The following table illustrates the mechanics of compound variable substitution on the
example variable &X.&Y.&A&&B&1C&2D.Z. (The substem &A&&B&1C&2D is
identical to the complex variable analyzed in “Complex Variable Substitution”
described earlier in this section.)
Step Operation
1a. Prefix “Z” into substitution buffer.
2a1). Prefix period (.) into substitution buffer.
2a2). Get next substem.
1b1). Use substitution rules in “Complex Variable Substitution” to analyze substem
&A&&B&1C&2D.
1b. Place “D” into temporary buffer.
1c. Look up “2.”
1d. Prefix value into buffer.
2a1). Prefix “C” into buffer.
2a2). Look up “1.”
2a3). Prefix value into buffer.
3. Get next segment.
2b1). Prefix “B” into buffer.
2b2). Validate content of buffer as a simple name and convert to uppercase.
2b3). Look up the variable in the buffer.
2b4). Place value into buffer.
3. Get next segment.
2c1). Validate content of buffer as a simple name and convert to uppercase.
2c2). Look up the variable in the buffer.
2c3). Place value into buffer.
4a1). Prefix “A” into buffer.
4a2). Validate content of buffer as a simple name and convert to uppercase.
Look up the variable in the buffer.
1b2). Prefix value into substitution buffer.
2a1). Prefix period (.) into substitution buffer.
2a2). Get next substem.
1b1). Look up “Y”.
1b2). Prefix value into substitution buffer.
2b. Get stem.
3b. Prefix “X” into substitution buffer.