v = e
Arithmetic/logical/character assignment:
Assigns the value of an arithmetic, logical, or character
expression to a variable.
``v'' is a variable name, an array element name, or a
character substring name.
``e'' is an expression.
Expression operators:
arithmetic ** exponentiation
* multiplication
/ division
+ addition, unary plus
- subtraction, unary minus
character // concatenation
relational .GT. greater than
.GE. greater than or equal to
.LT. less than
.LE. less than or equal to
.EQ. equal to
.NE. not equal to
logical .NOT. .NOT.A is true if and only if A is false
.AND. A.AND.B is true if and only if A and B are true
.OR. A.OR.B is true if either A or B or both are true
.EQV. A.EQV.B is true if and only if A and B are both true
or if A and B are both false
.NEQV. A.NEQV.B is true if and only if A is true and B is false
or if A is false and B is true
f([p[, p]...]) = e
Statement function:
creates a user-defined function having the variables ``p''
as dummy arguments. When referred to, the expression is
evaluated using the actual arguments in the function call.
``f'' is a statement function name.
``p'' is a symbolic name.
``e'' is an expression.
ASSIGN s TO v
Associates the statement label ``s' with the integer variable
``v'' for later use as a format specifier or in an assigned GO TO
statement.
``s'' is the label of a FORMAT statement or an executable statement.
``v'' is an integer variable name.
BACKSPACE ([UNIT=]u[, IOSTAT=ios][, ERR=s])
BACKSPACE u
Backspaces the currently open file on logical unit ``u'' one record.
``u'' is a logical unit specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
BLOCK DATA [nam]
Specifies the subprogram that follows as a BLOCK DATA subprogram.
``nam'' is a symbolic name.
CALL sub[([a][, [a]]...)]
Calls the subroutine subprogram with the name specified by ``sub'',
passing the actual arguments ``a'' to replace the dummy arguments
in the subroutine definition.
``sub'' is a subprogram name or entry point.
``a'' is an expression, an array name, a procedure name, or
an alternate return specifier. An alternate return specifier
is ``*s'', where ``s'' is the label of an executable statement.
CLOSE ([UNIT=]u[, p][, IOSTAT=ios][, ERR=s])
Closes the specified file.
``p'' is one of the following parameters:
STATUS = 'KEEP'
STATUS = 'DELETE'
``u'' is a logical unit specifier.
``s'' is the label of an executable statement.
``ios'' is an I/O status specifier.
COMMON [/[cb]/]nlist[[, ]/[cb]/nlist]...
Reserves one or more blocks of storage space under the name
specified to contain the variables associated with that block name.
``cb'' is a common block name.
``nlist'' is a list of one or more variable names, array names, or
array declarators separated by commas.
CONTINUE
Causes no processing, transfers control to the next executable statement.
DATA nlist/clist/[[, ]nlist/clist/]...
Initially stores elements of ``clist'' in the corresponding elements
of ``nlist''.
``nlist'' is a list of one or more variable names, array names, array
element names, character substring names, or implied DO lists,
separated by commas. Subscript expressions and substring
expressions must be constant.
``clist'' is a list of one or more constants separated by commas, each
optionally preceded by ``j*'', where ``j'' is a nonzero, unsigned
integer constant.
DIMENSION a([dl:]d[u])[, a([dl:]d[u])]...
Specifies storage space requirements for arrays.
``a(d)'' is an array declarator.
``a'' is an array name.
``dl:du'' are the lower (optional) and upper bounds of the array.
DO s[, ]v=e1, e2[, e3]
Executes a DO loop by performing the following steps:
- Evaluates ``cnt = INT ((e2-e1+e3)/e3)''.
- Sets ``v = e1''.
- If ``cnt'' is less than or equal to zero, does not execute the loop.
- If ``cnt'' is greater than zero, then:
- Executes the statements in the body of the loop.
- Evaluates ``v = v + e3''.
- Decrements the loop count ``cnt = cnt-1''. If ``cnt'' is
greater than zero, repeats the loop.
``s'' is the label of an executable statement.
``v'' is a variable name.
``e1'' is a numeric expression that specifies the initial value of ``v''.
``e2'' is a numeric expression that specifies the terminal value of ``v''.
``e3'' is a numeric expression that specifies the values by which to increment
the value of ``v''.
ELSE
ELSE IF (e) THEN
END
Marks the end of a program unit.
END IF
ENDFILE ([UNIT=]u[, IOSTAT=ios][, ERR=s])
ENDFILE u
Writes an end-of-file record on logical unit ``u''.
``u'' is a logical unit specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
ENTRY nam [([p[, p]...])]
Defines an alternate entry point within a subroutine or function subprogram.
``nam'' is the entry point name.
``p'' is a symbolic name or an alternate return specifier ``*''.
EQUIVALENCE (nlist)[, (nlist)]...
Assigns the same storage location to each of the names in {\f nlist}.
``nlist} is a list of two or more variable names, array names,
array element names, or character substring names separated
by commas. Subscript expressions and substring expressions
must be compile-time constant expressions.
EXTERNAL l[, l]...
Defines the names specified as user-defined subprograms.
``l'' is a subprogram name.
FORMAT (field specification, ...)
[typ] FUNCTION nam[([p[,p]...])]
Begins a function subprogram, indicating the program name and any dummy
argument names ``p''. An optional type specification can be included.
``typ'' is a data type specifier.
``nam'' is the function name.
``p'' is a symbolic name.
GO TO s
Transfers control to statement number ``s''.
``s'' is a label of an executable statement.
GO TO (slist)[, ]e
Transfers control to the statement specified by the value
of ``e'' (if ``e=1'', control transfers to the first statement label;
if ``e=2'', control transfers to the second statement label, and
so forth). If ``e'' is less than one or greater than the number
of statement labels present, no transfer takes place.
``slist'' is a list of one or more statement labels separated by commas.
``e'' is an integer expression.
GO TO v[[, ](slist)]
Transfers control to the statement most recently associated
with ``v'' by an ASSIGN statement.
``v'' is an integer variable name.
``slist'' is a list of one or more statement labels separated by commas.
IF (e) s1, s2, s3
Transfers control to statement ``s1'', ``s2'' or ``s3'' depending on the value
of ``e'' (if ``e'' is less than zero, control transfers to ``s1'';
if ``e'' equals zero, control transfers to ``s2''; if ``e'' is
greater than zero, control transfers to ``s3'').
``e'' is an expression.
``s1, s2, s3'' are labels of executable statements.
IF (e) st
Executes the statement if the logical expression has a value of true.
``e'' is an expression.
``st'' is any executable statement except a DO, END DO, END,
block IF, or logical IF.
IF (e1) THEN
. . .
ELSE IF (e2) THEN
. . .
ELSE
. . .
END IF
Defines blocks of statements and conditionally executes them. If the logical
expression in the IF THEN statement has a value of true, the first block is
executed and control transfers to the first executable statement after
the END IF statement.
If the logical expression has a value of false, the process
is repeated for the next ELSE IF THEN statement. If all
logical expressions have values of false, the ELSE block
is executed. If there is no ELSE block, control transfers
to the next executable statement following END IF.
``e1, e2'' are logical expressions.
``block'' is a series of zero or more FORTRAN statements.
IMPLICIT typ(a[, a]...)[, typ(a[, a]...)]...
The element ``a'' represents a single (or a range of) letter(s)
whose presence as the initial letter of a variable specifies
the variable to be of that data type.
``typ'' is a data type specifier.
``a'' is either a single letter, or a range of letters denoted by two letters
in alphabetical order separated by a hyphen (that is, X-Y).
INQUIRE (par[, par]...)
Furnishes information on specified characteristics of a
file or of a logical unit and its connections to a file.
INTRINSIC v[, v]...
Identifies symbolic names as representing intrinsic
functions and allows those names to be used as actual arguments.
``v'' is an intrinsic function name.
OPEN (par[, par]...)
PARAMETER (p=c[,p=c]...)
Defines a symbolic name for a constant.
``p'' is a symbolic name.
``c'' is a constant, the name of a constant, or a compile-time constant
expression.
PAUSE [disp]
Suspends program execution and displays a message on the screen.
``disp'' is a decimal digit string containing 1 to 5 digits or
a character constant.
PRINT
PROGRAM nam
Specifies a name for the main program.
``nam'' is a symbolic name.
READ ([UNIT=]u, [FMT=]f[, IOSTAT=ios][, END=s][, ERR=s]) [list]
READ f[,list]
Formatted sequential access:
reads one or more logical records from unit ``u'' and assigns
values to the elements in the list. The records are
converted according to the format specifier ``f''.
``u'' is a logical unit specifier.
``f'' is a format specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
READ ([UNIT=]u, [FMT=]*[, IOSTAT=ios][, END=s][, ERR=s]) [list]
READ *[,list]
List-directed sequential access:
reads one or more logical records from unit ``u'' and assigns
values to the elements in the list. The records are converted
according to the data type of the list element.
``u'' is a logical unit specifier.
``*'' denotes list-directed formatting.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
READ ([UNIT=]u[, IOSTAT=IOS][, END=s][, ERR=s]) [list]
Unformatted sequential access:
reads one unformatted record from unit ``u'' and assigns
values to the elements in the list.
``u'' is a logical specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
READ ([UNIT=)u, [FMT=]f, REC=r[, IOSTAT=ios][, ERR=s]) [list]
Formatted direct access:
reads record ``r'' from unit ``u'' and assigns values to the elements
in the list. The record is converted according to ``f''.
``u'' is a logical unit specifier.
``r'' is a record specifier.
``f'' is a format specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
READ ([UNIT=]u, REC=r[, IOSTAT=ios][, ERR=s]) [list]
Unformatted direct access:
reads record ``r'' from unit ``u'' and assigns values to the
elements in the list.
``u'' is a logical unit specifier.
``r'' is a record specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
READ ([UNIT=]c, [FMT=]f[, IOSTAT=ios][, ERR=s][, END=s]) [list]
Formatted internal:
reads into elements in the list one or more internal
records containing character strings, converting in
accordance with the format specification.
``c'' is an internal file specifier.
``f'' is a format specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
RETURN [i]
Returns control to the calling program from the current
subprogram.
``i'' is an integer value that indicates which alternate return
to be taken.
REWIND ([UNIT=]u[, IOSTAT=ios][, ERR=s])
REWIND u
Repositions logical unit ``u'' to the beginning of the
currently opened file.
``u'' is a logical unit specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
SAVE [a[,a]...]
Retains the definition status of an entity after the
execution of a RETURN or END statement in a subprogram.
``a'' is the name of a variable, an array, or a named common
block enclosed in slashes.
STOP [disp]
Terminates program execution and displays a message on the screen.
``disp'' is a decimal digit string containing 1 to 5 digits or a
character constant.
SUBROUTINE nam[([p[, p]...])]
Begins a subroutine subprogram, indicating the program name
and any dummy argument names ``p''.
``nam'' is the subroutine name.
``p'' is a symbolic name or an alternate return specifier ``*''.
type v[,v...]
Type declaration:
the symbolic names ``v'' are assigned the specified data type.
``typ'' is one of the following data type specifiers:
LOGICAL
INTEGER
REAL
DOUBLE PRECISION
COMPLEX
CHARACTER*len
CHARACTER*(*)
``v'' is a variable name, array name, function or function entry name, or an
array declarator. For character entities, the name can optionally be
followed by a length specifier ``*len'' or ``*(*)''.
WRITE ([UNIT=]u, [FMT=]f[, IOSTAT=ios][, ERR=s]) [list]
PRINT f[, list]
Formatted sequential access:
writes one or more logical records to unit ``u'' containing
the values of the elements in the list. The records are
converted according to ``f''.
``u'' is a logical unit specifier.
``f'' is a format specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
WRITE ([UNIT=]u, [FMT=]*[, IOSTAT=ios][, ERR=s]) [list]
PRINT *[, list]
List-directed sequential access:
writes one or more logical records to unit ``u'' containing
the values of the elements in the list. The records are
converted according to the data type of the list element.
``u'' is a logical unit specifier.
``*'' denotes list-directed formatting.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
WRITE ([UNIT=]u[, IOSTAT=ios][, ERR=s]) [list]
Unformatted sequential access:
writes one unformatted record to unit ``u'' containing the
values of the elements in the list.
``u'' is a logical unit specifier.
``s'' is the label of an executable statement label.
``ios'' is an I/O status specifier.
``list'' is an I/O list.
WRITE ([UNIT=]u, REC=r, [FMT=]f[, IOSTAT=ios][, ERR=s]) [list]
Formatted direct access:
writes the values of the elements of the list to record ``r'' on
unit ``u''. The record is converted according to ``f''.
``u'' is a logical unit specifier.
``r'' is a record specifier.
``f'' is a format specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement.
``list'' is an I/O list.
WRITE ([UNIT=]u, REC=r[, IOSTAT=ios][, ERR=s]) [list]
Unformatted direct access:
writes record ``r'' to unit ``u'' containing the values of the
elements in the list.
``u'' is a logical unit specifier.
``r'' is a record specifier.
``ios'' is an I/O status specifier.
``s'' is the label of an executable statement label.
``list'' is an I/O list.
WRITE ([UNIT=]c, [FMT=]f[, IOSTAT=ios][, ERR=s]) [list]}
Formatted internal:
writes elements in the list to the internal file specified
by unit ``u'', converting the elements to character strings
in accordance with the format specification.
``c'' is an internal file specifier.
``f'' is a format specifier.
``s'' is the label of an executable statement.
``ios'' is an I/O status specifier.
``list'' is an I/O list.