Page 130 - Standard Handbook Of Petroleum & Natural Gas Engineering
P. 130
Computer Applications 115
Data Structures.
Variable-May be assigned value by a numerical or character constant, by
input, or by an expression.
Array-May have up to seven dimensions; number and size (upper and lower
boundaries) of dimensions are declared in DIMENSION or TYPE statements.
File-External (physical) only; may be sequential or random access.
Statements. Most statements, except where noted otherwise, begin in the
seventh column of a page considered to be 80 columns wide; continuation lines
are indicated by a "+" (symbol may vary with version of language) in the sixth
column. The first five columns are reserved for labels (line numbers), which are
only required if the line is referenced by another statement, and for comment
lines, which are determined by a character in the first column. Columns 7 to
72 are reserved for statements; 73-80 are not read. (See Table 1-24 for required
order of statements in FORTRAN.)
Nonexecutable Statements.
Program unit heading-Program name, function name, or subroutine name.
Type declaration-Specifies data type to be represented by a variable name
(overrides defaults), e.g.,
REAL MSR
INTEGER COUNT, PNUM, AP
LOGICAL TEST1
CHARACTER* 10 LNAME
Implicit declaration-Allows type specification for all names beginning with
the given first letter(s)
IMPLICIT DOUBLE PRECISION (A-Z)
IMPLICIT COMPLEX (C)
Table 1-24
Order of Statements in FORTRAN
I PROGRAM, FUNCTION, SUBROUTINE or BLOCK DATA Statements
IMPLICIT Statements
PARAMETER Statements
FORMAT DIMENSION, COMMON TYPE,
COMMENT and and EQUIVALENCE Statements
Lines ENTRY Statement
Statements Function
DATA Definitions
Statements
Executable
Statements

