LF Fortran 95

RETURN Statement


The RETURN statement causes a transfer of control from a subprogram back to the calling procedure. Execution continues at the statement following the procedure invocation.


RETURN [alt-return]

alt-return is a scalar INTEGER expression.


If alt-return is present and has a value n between 1 and the number of asterisks in the subprogram's dummy argument list, the CALL statement that invoked the subroutine transfers control to the statement identified by the nth alternate return specifier in the actual argument list.


subroutine zee() return ! transfer of control back to caller end subroutine zee