FORTRAN Reference Manual
Expressions
FORTRAN Reference Manual—528615-001
3-11
Operator Precedence
Operator Precedence
Each FORTRAN operator has a precedence relative to all other operators. When the 
compiler evaluates an expression, it compares the precedence of two adjacent 
operators. If one operator has higher precedence than the other, the operator with the 
higher precedence is evaluated first. For further information on operator precedence 
within an operator class, see the appropriate discussion in this section.
You can override the normal operator precedence by enclosing expressions in 
parentheses.
Table 3-7 shows the precedence of all FORTRAN operators, where 0 is the highest 
precedence, 9 is the lowest precedence.
.NEQV. .TRUE. .TRUE. .FALSE.
.TRUE. .FALSE. .TRUE.
.FALSE. .TRUE. .TRUE.
.FALSE. .FALSE. .FALSE.
Table 3-7. Operator Precedence (page1of2)
Operator Class Operator Precedence
Arithmetic  **
unary +
unary -
*
/
+
-
0
1
1
2
2
3
3
Table 3-6. Evaluation of Logical Expressions (page 2 of 2)
Operator Operand Operand Result










