Previous Topic: Arithmetic Expressions

Next Topic: Divide (REAL Arithmetic)

Arithmetic Operators

The arithmetic operators are symbols used to specify the operation required when a simple expression is evaluated. The operators used by NCL are, in precedence groups:

**

Exponentiation

/

Divide (REAL number arithmetic)

/

Divide quotient (INTEGER arithmetic)

\

Divide remainder (INTEGER arithmetic)

*

Multiplication

-

Subtraction

+

Addition

Within each group, the individual operators have equal precedence. The multiplication operator is therefore no more or less significant than the divide operators. Processing of these operators takes place in strict left to right sequence within the expression.

While most of the operators are familiar, the divide options differ depending upon the arithmetic mode that is being used, REAL or INTEGER.