NET/MASTER Network Control Language (NCL) Reference Manual
Lexical Elements of NCL
Compiler Operation
106126 Tandem Computers Incorporated 8–7
Some examples of hexadecimal strings are:
What You Type Resultant String Contents
'313233343536'x 123456
'4a 4b 4c 4d'X JKLM
'4A4B4C4D'x JKLM
In the following example, “313233343536” is a hexadecimal string because the plus
sign (+) is a lexical element delimiter, delimiting the lexical element “313233343536”X
from the symbol 123:
"313233343536"X+123
This is the same as 123456+123.
However, the string “313233343536” in the following example is not an example of a
hexadecimal string because the compiler treats the X after the closing quote as the
beginning of the symbol X123:
"313233343536"X123
The compiler regards the closing quote as a lexical element delimiter. The two lexical
elements are 313233343536 and X123.
A binary string can contain only the characters 0, 1, or blank. Blanks are permitted
only at logical byte boundaries, and no leading or trailing blanks are permitted. Up to
seven leading zeros can be prefixed to make the string a multiple of eight bits. The
value of the string is the ASCII equivalent of the eight binary bits.
Some examples of binary strings are:
What You Type Resultant String Contents
'00110001 00110010 00110011'b 123
'01001010 01001011 01001100'B JKL
The rules that are used to delimit binary strings are the same as those used to delimit
hexadecimal strings.
You can use a quoted string as a number if the quoted string is in a context that
permits it to be a number, and the characters within the quotes are consistent with the
following syntax:
[ … ][+|-][ … ][ 0–9 … ][ . ][ 0–9 … ][ E [+|-][ 0–9 … ]][ … ]
Then the compiler treats the sequence of characters within the quotes as a number.
You can include leading blanks, a leading plus or minus, more leading blanks, and
trailing blanks, if you wish. For example, the quoted string “-455.3e-3” is a number in
the following context:
&a = 1 + "-455.3e-3"
The quoted string is still a number even if it has more blanks, as shown next:
' - 455.3e-3 '