
APPENDIX A FORTRAN-80 STATEMENT SUMMARY
A.1 Statement Sequence
The following order of statements and lines must be observed when coding a FORTRAN program.
1.Comment lines can appear before or between statements, but cannot appear after an END statement.
2.The PROGRAM statement, if used, must be the first statement of a main program. The first statement of a subprogram must be a FUNCTION, SUBROUTINE, or BLOCK DATA statement.
Within a program unit that permits the following statements:
3.FORMAT statements can appear before the END statement.
4.IMPLICIT statements must precede all other specification statements.
5.All specification statements must precede all DATA statements, which must precede statement function statements, which must precede all executable statements.
6.The last line of a program unit must be an END statement.
These rules are summarized in Figure
A.2 Statement Summary
In the following summary, any format item enclosed in square brackets is optional. Ellipses indicate the preceding item can be repeated indefinitely (within statement length limits).
| ASSIGN Statement | |
Category: Executable |
|
|
Text Reference: Section 3.3.4 |
|
|
|
|
|
Format |
| Function |
|
|
|
ASSIGN stl TO name |
| Assign statement label ' stl' to |
|
| integer variable 'name.' |
|
|
|
| Assignment Statement | |
Category: Executable |
|
|
Types: Arithmetic, Character, Logical
Text Reference: Sections 3.3.1,3.3.2,3.3.3
Format
v = e
Function
Assign value of 'e' to 'v,' where 'v' is type integer, real, logical, or character.