In single mode arithmetic expressions, the result of an operation is identical to that of the operands. The following is a table showing this fact. The empty entries will be discussed in mixed mode arithmetic expressions.
| Operator | INTEGER | REAL |
| INTEGER | INTEGER | mixed mode |
| REAL | mixed mode | REAL |
The following are rules of evaluating a more complicated single mode arithmetic expression:
In the above expression, in the left to right scan, operator * is encountered first. Since the the operator - is lower, 3 * 5 is evaluated first transforming the given expression to 15 - 4. Hence, the result is 11.3 * 5 - 4
if the current operator is +, since the next operator * has higher priority, the scan continues to *. Once the scan arrives at *, since the next operator ** is higher, 7 ** 3 is evaluated first, transforming the given expression to4 + 5 * 7 ** 3
Then, the new expression is scan again. The next operator to be evaluated is *, followed by +. Thus, the original expression is evaluated as 4 + (5 * (7 ** 3)).4 + 5 * 343
In the following examples, brackets are used to indicated the order of evaluation.
2 * 4 * 5 / 3 ** 2
--> [2 * 4] * 5 / 3 ** 2
--> 8 * 5 / 3 ** 2
--> [8 * 5] / 3 ** 2
--> 40 / 3 ** 2
--> 40 / [3 ** 2]
--> 40 / 9
--> 4
100 + (1 + 250 / 100) ** 3
--> 100 + (1 + [250 / 100]) ** 3
--> 100 + (1 + 2) ** 3
--> 100 + ([1 + 2]) ** 3
--> 100 + 3 ** 3
--> 100 + [3 ** 3]
--> 100 + 27
--> 127
1.0 + 2.0 * 3.0 / ( 6.0*6.0 + 5.0*44.0) ** 0.25
--> 1.0 + [2.0 * 3.0] / (6.0*6.0 + 5.0*44.0) ** 0.25
--> 1.0 + 6.0 / (6.0*6.0 + 5.0*55.0) ** 0.25
--> 1.0 + 6.0 / ([6.0*6.0] + 5.0*44.0) ** 0.25
--> 1.0 + 6.0 / (36.0 + 5.0*44.0) ** 0.25
--> 1.0 + 6.0 / (36.0 + [5.0*44.0]) ** 0.25
--> 1.0 + 6.0 / (36.0 + 220.0) ** 0.25
--> 1.0 + 6.0 / ([36.0 + 220.0]) ** 0.25
--> 1.0 + 6.0 / 256.0 ** 0.25
--> 1.0 + 6.0 / [256.0 ** 0.25]
--> 1.0 + 6.0 / 4.0
--> 1.0 + [6.0 / 4.0]
--> 1.0 + 1.5
--> 2.5