NET/MASTER Network Control Language (NCL) Reference Manual
Arithmetic Operators and Expressions
Expressions and Operators
10–8 106126 Tandem Computers Incorporated
Arithmetic Operators
and Expressions
This subsection describes arithmetic operators and arithmetic expressions.
Arithmetic Operators Arithmetic operators specify an arithmetic operation on one or more terms in an
expression. Table 10-2 lists arithmetic operators in order of precedence. Operators
with the same level of precedence are grouped together.
Table 10-2. Arithmetic Operators in Order of Precedence
Operator Operation
+ Unary plus
- Unary minus
** Exponentiation
* Multiplication
/ Division
// Integer division
% Remainder
+ Addition
- Subtraction
Unary Plus Operator (+)
The unary plus operator forces the numeric interpretation of the term to which it is
adjacent. The term must represent a valid number. The unary plus operator (+) does
not change the numeric value of the term.
The general syntax for using the unary plus operator is:
+
term
term
specifies a term in an expression. Terms are defined at the beginning of this
section under “The Composition of Expressions.”
Some examples are listed in the following table:
What You Type Result
&a = 1 + +1 &a has the value 2.
say +99 Symbol 99 is displayed.