FORTRAN Reference Manual

Statements
FORTRAN Reference Manual528615-001
7-63
IMPLICIT Statement
Example
IF (sales .GT. 5000) THEN
IF (travel .LT. 1000) THEN
bonus = 100
ELSE
bonus = 50
END IF
ELSE
bonus = 50
END IF
IMPLICIT Statement
The IMPLICIT statement redefines or confirms the default typing of variables, arrays,
and functions, based on the first letter of the item’s name.
type
is one of the following data type specifiers: INTEGER, INTEGER*2, INTEGER*4,
INTEGER*8, REAL, DOUBLE PRECISION, COMPLEX, LOGICAL, or
CHARACTER [* length].
char-list
indicates one or more characters either in the form of a list or a range. Separate list
items with commas. Indicate a range as:
first-char - last-char
Considerations
An IMPLICIT statement declares that the data type of any variable, array, function,
or RECORD field whose name begins with the letters in char-list is the data
type you specify for that letter in an IMPLICIT statement unless you explicitly
declare the data type of the symbolic name.
IMPLICIT statements must precede all declaration statements except
PARAMETER statements.
If you do not specify a length for character-type data, the length is assumed to be
one. You must specify the length as an integer constant or an integer constant
expression enclosed in parentheses. The specified length applies to all entities in
char-list. The following statement declares that all symbolic names beginning
IMPLICIT type ( char-list) [, type ( char-list) ]...