It is a three way branch statement of the form,
IF(expression
)
label1
,
label2
,
label3
![]()
Here expression
is any expression producing a result of type
INTEGER,
REAL or DOUBLE PRECISION, and the three labels are statement labels of
executable statements. If the value of the expression is negative,
execution
transfers to the statement labelled
label1
. If the expression is
zero,
transfer is to the statement labelled
label2
, and a positive result
causes transfer to
label3
. The same label can be repeated.
This relic of the original Fortran has been redundant since the early 1960s when the logical IF and computed GOTO were introduced and it should be replaced by an equivalent CASE or IF construct.