Intel fortran-80 Laptop User Manual


 
Introduction
To
FORTRAN
1-4
1.2.3 Order of Statements
The
following
order
must
be observed in coding
FORTRAN
statements lines:
1.
Comment
lines can
appear
before
or
between statements. They
cannot
appear
after
the
END
statement.
2.
The
PROGRAM
statement can
appear
only as the first statement
of
a main
program.
FUNCTION,
SUBROUTINE,
and
BLOCK
DATA
can
appear
only
as the first statement
of
a
subprogram
(Section 2.1.1).
3.
FORMAT
statements
can
appear
anywhere before the
END
statement.
4.
IMPLICIT
statements must precede all
other
specification statements.
5. All specification statements (lists 1
and
2 in section 1.2.2) must precede all
DATA
statements, which
must
precede all statement function statements, which
must
precede all executable statements.
6.
The
last line
of
a
program
unit must be the
END
statement.
The
rules for ordering
FORTRAN
statements are summarized in Figure 1-2.
PROGRAM,
FUNCTION,
SUBROUTINE,
or
BLOCK
DATA
Statement
IMPLICIT
Statements
Comment
FORMAT
Other
Specification
Lines Statements
Statements
DA
T A Statements
Statement
Function
Statements
Executable Statements
END
Statement
Figure 1-2.
Order
of
FORTRAN
Statements
FORTRAN-SO