Intel fortran-80 manual APPENDIX A FORTRAN-80STATEMENT SUMMARY, A.1 Statement Sequence

Models: fortran-80

1 130
Download 130 pages 742 b
Page 91
Image 91
APPENDIX A FORTRAN-80 STATEMENT SUMMARY

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 1-2.

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.

A-l

Page 91
Image 91
Intel fortran-80 manual APPENDIX A FORTRAN-80STATEMENT SUMMARY, A.1 Statement Sequence, A.2 Statement Summary