NET/MASTER Network Control Language (NCL) Reference Manual

Lexical Elements of NCL
Compiler Operation
8–4 106126 Tandem Computers Incorporated
Symbols A symbol is a lexical element that consists of one or more of the characters in Table 8-3.
The compiler delimits the symbol by a blank, by a character that is illegal for the
symbol type, or by the end of the line. A symbol can be an unquoted string, a
keyword, or a number.
Table 8-3. Symbol Characters
Character Name of
Character
Restrictions
A-Z Uppercase letters Letters remain as uppercase letters in all circumstances.
a-z Lowercase letters Letters may be converted to uppercase, depending on context.
0-9 Digits None.
. Period None.
_ Underscore None.
@ At sign None.
# Number sign None.
$ Dollar sign None.
+ Plus sign Used only after the exponent in a valid number.
- Minus sign Used only after the exponent in a valid number.
Some examples of valid symbols are the following:
Symbol Meaning
A An unquoted string of a single uppercase letter.
ABC An unquoted string of uppercase letters.
abc An unquoted string of lowercase letters.
.XY_Z An unquoted string using the period and the underscore.
123 Either an unquoted string or a number depending on context.
.7H An unquoted string but not a number (since it does not follow the numeric syntax
described later).
WHILE Either an unquoted string or a keyword, depending on context.
The meaning of a particular symbol depends on the context. For example, the
compiler treats the symbol THEN as either an unquoted string or a keyword,
depending on its context. In the statement SAY THEN, the compiler treats THEN as
an unquoted string and displays the sequence of characters THEN on your screen.
However, in an IF statement, the compiler treats THEN as a keyword.
In another example, the compiler treats the number 0023 as either an unquoted string
or a number, depending on its context. In the statement SAY 0023, the compiler treats
0023 as an unquoted string and displays the sequence of characters 0023 on your
screen. However, in the statement SAY 0023+0, the compiler treats 0023+0 as a
number and displays the result of adding 0 to 23 on your screen: that is, 23.