FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-58
IF Statement—Arithmetic
The following example shows a computed GO TO:
INTEGER region
5 READ (*,*) region
READ (*,*) time
GO TO (10, 20, 30) region
10 charge = time * .25
GO TO 40
20 charge = time * .27
GO TO 40
30 charge = time * .36
GO TO 40
40 CONTINUE
The following example shows an assigned GO TO:
10 ASSIGN 20 TO k
20 I = 50
.
.(main processing loop)
.
250 IF (type .EQ. 'end') ASSIGN 350 TO k
.
340 GO TO k, (20,350)
350 TOT = i + m
.
.
IF Statement—Arithmetic
The arithmetic IF statement conditionally transfers control to one of three statement 
labels.
exp
is an arithmetic expression.
IF ( exp) label1, label2, label3










