HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
SUBROUTINE
Chapter 10 475
SUBROUTINE altitude (*, long, lat)
! asterisk (*) indicates alternate return
IMPLICIT NONE
INTEGER, OPTIONAL :: long, lat
RETURN 1
END SUBROUTINE altitude
The preceding subroutines may be referenced with the CALL statement, as in the following
program:
PROGRAM reject
CALL exchange (a,t) ! A subroutine reference
! subroutine reference, including an alternate return label,
! missing optional argument, and an argument keyword
CALL altitude (*90, lat = 49)
END PROGRAM reject
Following are some other examples of subroutine statements:
SUBROUTINE pressure_surface ! No arguments
SUBROUTINE taffy () ! Also no arguments
RECURSIVE SUBROUTINE fact (n, x)
Related statements
CALL, END, ENTRY, FUNCTION, and RETURN
Related concepts
For related information, see the following:
“External procedures” on page 161
Arguments” on page 171