Next: Built-in Functions
Up: Expression Syntax
Previous: Arithmetic operations.
The standard logical/boolean operators .EQ., .NE., .GT., .LT.,
.GE., .LE., .OR., .AND. and .NOT. are available and their use
is identical to Fortran 77, except that there is no distinct logical data
type. These boolean operators have numerical operands and return numerical
values. A numerical value is considered ``true'' if it is non-zero and
``false'' if it is zero.7 The above operators return a value of 1 for
``true'' and zero for ``false''.
These operators may also be specified within an expression using the
equivalent C forms:
==,
!=,
>,
<,
>=,
<=,
||,
&& and
!.
These operators can be used with the built-in function ``QIF''. This
function has 3 arguments. It returns the value of its second argument if its
first argument is non-zero (i.e. ``true''), and returns the value of its
third argument otherwise. It can be used like the ``?'' operator in the C
programming language.
Next: Built-in Functions
Up: Expression Syntax
Previous: Arithmetic operations.
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