HP Fortran Programmer's Reference (September 2007)

Expressions and assignment
Expressions
Chapter 4 91
Highest User defined unary operators
.**
.* /
. Unary + Unary -
.+ -
.//
. .EQ. .NE. .LT. .LE. .GT. .GE.
== /= < <= > >=
. .NOT.
. .AND.
. .OR.
. .EQV. .NEQV. .XOR.
Lowest User-defined binary operators
Table 4-3 Examples of operator precedence
Expression How evaluated Explanation
a+b*c a + (b*c) * has a higher precedence
than +.
a/b*c (a/b)*c / and * have the same
precedence, and evaluation
is left to right.
a**b**c a**(b**c) ** evaluates right to left.
a.AND.b.AND.
c.OR.d
((a.AND.b).AND.c).
OR.d)
Logical operators evaluate
left to right.
Table 4-2 Operator precedence (Continued)