DrClaude
Mentor
- 8,477
- 5,693
Where?jbriggs444 said:The standard disagrees.
(emphasis added)Fortran 90 standard said:2.3.4 Execution sequence
Execution of an executable program begins with the first executable construct of the main program. The execution of a main program or subprogram involves execution of the executable constructs within its scoping unit. When a procedure is invoked, execution begins with the first executable construct appearing after the invoked entry point. With the following exceptions, the effect of execution is as if the executable constructs are executed in the order in which they appear in the main program or subprogram until a STOP, RETURN, or END statement is executed. The exceptions are:
Internal subprograms may precede the END statement of a main program or a subprogram. The execution sequence excludes all such definitions.
- (1) Execution of a branching statement (8.2) changes the execution sequence. These statements explicitly specify a new starting place for the execution sequence.
- (2) IF constructs, CASE constructs, and DO constructs contain an internal statement structure and execution of these constructs involves implicit (i.e., automatic) internal branching. See Section 8 for the detailed semantics of each of these constructs.
- (3) Alternate return and END=, ERR=, and EOR= specifiers may result in a branch.