## 8.8.6 Alternate Return Arguments

Alternate return (dummy) arguments can appear in a subroutine argument list. They cause execution to transfer to a labeled statement rather than to the statement immediately following the statement that called the routine. The alternate return is indicated by an asterisk (*). (An alternate return is an obsolescent feature in Fortran 90 and Fortran 95.)

There can be any number of alternate returns in a subroutine argument list, and they can be in any position in the list.

An actual argument associated with an alternate return dummy argument is called an alternate return specifier; it is indicated by an asterisk (*), or ampersand (&) followed by the label of an executable branch target statement in the same scoping unit as the CALL statement.

Alternate returns cannot be declared optional.

In Fortran 90, you can also use the RETURN statement to specify alternate returns.

The following example shows alternate return actual and dummy arguments:

    CALL MINN(X, Y, *300, *250, Z)
    ....
    SUBROUTINE MINN(A, B, *, *, C)

For More Information:

- On general rules for procedure argument association, see Section 8.8.
- On subroutine subprograms, see Section 8.5.3.
- On the CALL statement, see Section 7.2.
- On the RETURN statement, see Section 7.9.
- On obsolescent features in Fortran 90 and Fortran 95, see Appendix A.

Previous Page Next Page Table of Contents