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( tex2html_wrap_inline21746  expression  tex2html_wrap_inline21748 )  tex2html_wrap_inline21746  label1  tex2html_wrap_inline21748 , tex2html_wrap_inline21746  label2  tex2html_wrap_inline21748 , tex2html_wrap_inline21746  label3  tex2html_wrap_inline21748  

Here tex2html_wrap_inline21746  expression tex2html_wrap_inline21748 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 tex2html_wrap_inline21746  label1 tex2html_wrap_inline21748 . If the expression is zero, transfer is to the statement labelled tex2html_wrap_inline21746  label2 tex2html_wrap_inline21748 , and a positive result causes transfer to tex2html_wrap_inline21746  label3 tex2html_wrap_inline21748 . 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

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 15:03:35 GMT 1996
Not for commercial use.