NET/MASTER Network Control Language (NCL) Reference Manual

10 Expressions and Operators
106126 Tandem Computers Incorporated 10–1
This section discusses expressions and operators. It includes the following topics:
An overview of expressions and operators
The precedence of operators
Using parentheses in expressions
Arithmetic operators and expressions
Relational operators and expressions
Boolean operators and expressions
Concatenation operators and expressions
For help in understanding syntax notation, see “Notation Conventions” at the
beginning of this manual.
An Overview of
Expressions
This subsection provides an overview of expressions. The subsection discusses:
The composition of expressions
Using expressions in statements
Expression analysis and evaluation
Expression optimization
Automatic type conversion
The Composition of
Expressions
An expression consists of one or more terms connected by operators. Expressions can
be simple, consisting of one term, or complex, consisting of multiple terms and
operators. A term is the basic unit of an expression. Operators work on the terms to
arrive at a value for the expression. A term that is operated on by an operator is called
an operand. A term can be a:
Symbol, other than a reserved word in the current context
Quoted string
Variable
Parenthesized expression
Function reference
Variables are discussed in Section 9, “Variables.” Symbols are discussed in Section 8,
“Compiler Operation.” Strings, parenthesized expressions, and function references
are discussed in this section.