Purpose
The arithmetic IF statement transfers program control to one of three executable statements, depending on the evaluation of an arithmetic expression.
Format
>>-IF--(--arith_expr--)--stmt_label1--,--stmt_label2--,---------> >--stmt_label3------------------------------------------------->< |
The arithmetic IF statement evaluates arith_expr and transfers control to the statement identified by stmt_label1, stmt_label2, or stmt_label3, depending on whether the value of arith_expr is less than zero, zero, or greater than zero, respectively.
IF (K-100) 10,20,30 10 PRINT *,'K is less than 100.' GO TO 40 20 PRINT *,'K equals 100.' GO TO 40 30 PRINT *,'K is greater than 100.' 40 CONTINUE
Related Information