Intel fortran-80 Laptop User Manual


 
Defining Variables, Arrays,
And
Memory
3-4
The
IMPLICIT
statement has the format:
IMPLICIT
typ
(let
[,/et] ... ) [,typ
(let
[,let].
..
)].
..
where
typ
is
INTEGERf*bml ,
REAL,
LOGICALt~lejz],
or
CHARACTER[*
len]
let
is
a single letter
or
a range
of
letters in alphabetical
order
(e.g., C, I-M, N-Z)
The
IMPLICIT
statement applies only to the program unit in which it appears
and
must
precede all other specification statements in that program unit. The
program
unit can have more
than
one
IMPLICIT
statement,
but
the same letter
cannot
be
specified
more
than
once.
Example:
IMPLICIT REAL(A-B, D-H), CHARACTER
(C)
IMPLICIT INTEGER (I-N), LOGICAL
(O-l)
Unless these implicit definitions are overridden, the following symbols would have
the types indicated.
AVG
CNAME
FPNUM
INUM
PFLAG
(REAL)
(CHARACTER)
(REAL)
(INTEGER)
(LOGICAL)
3.2 Array Definition
An
array
is
defined by assigning a symbolic name to the array
and
specifying its
dimensions.
One
way to
do
this
is
with type statements:
CHARACTER
TICTAC(3,3)
LOGICAL
TABLE(2,3,3)
Arrays can also be defined by the
COMMON
statement (section 3.4.2)
and
by the
DIMENSION
statement.
In any case, a symbol can be used only once in a
program
unit as
an
array name
in
an
array declarator
(section 3.2.1). The symbol
'TICTAC'
in the example above could
not
be defined in a
DIMENSION
statement as well as in the
CHARACTER
type
statement. The
array
name could,
of
course,
appear
as a reference
or
array element
name
elsewhere:
TICTAC(3,2) = 'X'
FORTRAN-SO