next up previous contents
Next: ASSIGN Statement Up: Obsolescent Features Previous: Obsolescent Features

Arithmetic IF Statement

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.


next up previous contents
Next: ASSIGN Statement Up: Obsolescent Features Previous: Obsolescent Features

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.