FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-95
RETURN Statement
Example
RECORD employees
FILLER*19
RECORD address
CHARACTER*20 street
CHARACTER*10 city
CHARACTER*5 state
INTEGER zip
END RECORD
RECORD grade
CHARACTER*10 department
REAL pay
INTEGER*4 empnumber
END RECORD
END RECORD
RETURN Statement
The RETURN statement terminates execution of a subprogram and returns control to 
the calling program unit.
iexp
is an integer expression that designates an alternate return from the subroutine.
Considerations
•
A procedure subprogram ends with an END statement. However, both function 
subprograms and subroutine subprograms can include one or more RETURN 
statements to designate alternate exit points. For example:
SUBROUTINE numbers (j, k, n)
.
READ (*,*) number
IF (number .GT. 1) RETURN
.
END
RETURN [ iexp ]










