Next: Storing and representing columns of angles
Up: Expression syntax
Previous: Rules for expressions
The operator precedence rules are show in Table
. The rules
of Fortran 90 are used as far as possible; in this table the larger
numbers denote higher precedence (tighter binding).
Table:
Operator precedence rules
|
| Precedence |
Function/operator |
| 2 |
start/end of expression |
| 4 |
( ) |
| 6 |
, |
| 8 |
.EQV. .NEQV. |
| 10 |
.OR.  |
| 12 |
.AND. & |
| 14 |
.NOT. # |
| 16 |
.EQ. .GE. .GT. .LE. .LT. .NE.
 |
| 18 |
FROM TO |
| 20 |
// |
| 22 |
+ - (binary operators) |
| 24 |
+ - (unary operators) |
| 26 |
* / |
| 28 |
** |
| 30 |
all functions |
|
Note that all operators except ** associate from left to right, but
** and functions associate from right to left.
Next: Storing and representing columns of angles
Up: Expression syntax
Previous: Rules for expressions
CURSA Catalogue and Table Manipulation Applications
Starlink User Note 190
A.C. Davenhall
4th November 2001
E-mail:starlink@jiscmail.ac.uk
Copyright © 2001 Council for the Central Laboratory of the Research Councils