NET/MASTER Network Control Language (NCL) Reference Manual
Concatenation Operator and Expressions
Expressions and Operators
106126 Tandem Computers Incorporated 10–19
Blanks adjacent to the inside of a parenthesis are not regarded as a blank operator and
are deleted, as the following examples illustrate. However, blanks adjacent to the
outside of a parenthesis are significant, and can form a blank operator if they are not
adjacent to some other blank-removing lexical element. Here are some examples:
What You Type Result of Concatenation Processing
( a || b ) ab
( 00232 || 444 ) 00232444
( 00232 || 444 ) + 1 232445
a ( b ) a b
a (b) a b
The double zero (00) is not dropped in the preceding second example because the
terms are not treated as numbers. However, it is dropped in the third example
because the presence of the plus sign (+) means that the compiler treats the terms in
the expression as numbers.
Using Abuttal to
Concatenate Strings
In addition to explicit concatenation with the concatenation operator (||) and implied
concatenation with the blank operator, you can abut two terms to concatenate them.
The abuttal operation concatenates the left and right terms of an expression as if the
explicit concatenation operator (||) had been specified.
This operation is performed when:
A quoted string is next to a symbol.
A quoted string is next to a variable.
Two quoted strings (each with a different quote sign, either " or ') are next to each
other.
A symbol is next to a variable (due to variable syntax rules, only when the symbol
precedes the variable).
Some examples are listed in the following table:
What You Type Result of Concatenation Processing
abc'def' abcdef
"abc"def abcdef
'abc'&def abc1 (if &def has a value of 1)
&def"abc" 1abc (if &def has a value of 1)
'123'"abc" 123abc
"123"'abc' 123abc
X&ABC X2 (if &ABC has a value of 2)
In the last example, &ABC is regarded by the compiler as a simple variable name of
ABC.