HP 3000 Manuals

Order of Statements [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

Order of Statements 

Statements are restricted as to where they can appear in a program unit.
Within a program unit, the following rules apply:

   *   PROGRAM, SUBROUTINE, FUNCTION, and BLOCK DATA statements can
       appear only as the first statement in a program unit.

   *   All specification statements must precede all statement function
       statements and executable statements.

   *   IMPLICIT statements must precede all other specification
       statements except PARAMETER statements.

   *   All statement function statements must precede all executable
       statements.

   *   FORMAT and ENTRY statements can appear anywhere.

   *   The last line of a program unit must be an END statement.

The required order of statements is shown in Figure 3-1 .

Vertical lines delineate varieties of statements that can be
interspersed.  For example, DATA statements can be interspersed with
statement function statements and executable statements.

Horizontal lines delineate varieties of statements that must not be
interspersed.  For example, statement function statements must not be
interspersed with executable statements.

[]
Figure 3-1. Required Order of Statements


MPE/iX 5.0 Documentation