HP Fortran Programmer's Reference (September 2007)

Program units and procedures
External procedures
Chapter 7166
Here are the command lines to compile and execute the program, along with the output from
a sample run:
$ f90 alt_return.f90
$ a.out
Line 25 in subr
Default returning point
Line 30 in subr
Line 10 in main
Line 35 in subr
Line 15 in main
Alternate entry points
When a procedure is referenced, execution normally begins with the first executable
statement in the procedure. Using the ENTRY statement, however, the programmer can define
alternate entry points into the procedure and associate a name with each entry point. Each
ENTRY statement within a procedure defines a procedure entry, which can be referenced by
name as a separate, additional procedure.
The syntax for the ENTRY statement is:
ENTRY
entry-name
([
dummy-arg-list
])[RESULT (
result-name
)]