next up previous 229
Next: Boolean operations.
Up: Expression Syntax
Previous: Constants.

Arithmetic operations.

The standard arithmetic operators $+$, $-$, $*$, $/$ and $**$ are available and their use is identical to Fortran 77, thus:

`Q + 3.0' ... add 3.0 to Q
`-6.7 - DATA' ... subtract DATA from $-$6.7
`INPUT * 14' ... multiply INPUT by 14
`4 / V2' ... divide 4 by V2
`NUMBER ** INDEX' ... raise NUMBER to the power INDEX

The normal rules of operator precedence apply. Matching pairs of parentheses may also be used (and are recommended) to explicitly define the order of expression evaluation; they may be nested arbitrarily deeply. Note that the precision with which arithmetic is performed is not determined until an expression is actually evaluated (Section [*]).6



next up previous 229
Next: Boolean operations.
Up: Expression Syntax
Previous: Constants.

TRANSFORM Coordinate Transformation Facility
Starlink User Note 61
R.F. Warren-Smith
12th January 2006
E-mail:starlink@jiscmail.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils