Intel fortran-80 Laptop User Manual


 
APPENDIX C
HOLLERITH DATA TYPE
The
Hollerith
data
type
is
a
carryover
from
FORTRAN
66.
Generally
speaking,
the
character
data
type
provides
a
superior
processing
capability,
and
Hollerith
has
been
retained
in
FORTRAN-80
primarily
for
compatibility
with
the
earlier
standard.
C.1
Hollerith As A Data Type
Although
Hollerith
is
a
data
type, a symbolic
name
cannot
be
of
type
Hollerith.
Hollerith
data
(other
than
Hollerith
constants)
are
identified
under
the
guise
of
an
integer, real,
or
logical
type
name.
It
cannot
be
identified
as type
character.
Integer,
real,
or
logical items
can
be
defined
with a
Hollerith
value using
either
the
DA
TA
or
READ
statements.
Totally
associated
items
then
become
associated
with
that
Hollerith
value also.
When
such a
definition
occurs,
the
defined
item loses its
integer, real,
or
logical
characteristic.
C.2 The Hollerith Constant
The
format
of
a
Hollerith
constant
is
where
'n'
is
a
nonzero,
unsigned,
integer
constant
and
'h'
is
any
character
represen-
table
in
the
processor.
Blanks
are
significant in
the
character
string
following
the
'H.'
Hollerith
constants
can
appear
only
in a
DATA
statement
and
in
the
argument
list
of
a
CALL
statement.
C.2.1 Hollerith Constants In DATA Statements
A
Hollerith
constant
may
appear
in
the
'elist'
of
a
DATA
statement;
the
correspon-
ding
entity
in
'nlist'
must
have
type integer, real,
or
logical.
Foran.
entity
()~t~pe
in:t~8~r
, real,
or
logi9al,t?e~umbe~?fcharacters'
Il'in
the
COP
responding
Holleritnconstantmust
belesstllanoreql;1{l:l
to'~~'~here'g!
..
~s.the
len~thofthe~t{)r3'~e~~it()f:the
~ntity;·
If
'n;
j~
less
thal1~.p,'t~~el'tity
is
jniti~lized
with the
~n'Hollepithch~rfl;ctersextended.ontherjghtwith
'g~ntljlank
characters.
Each
Hollerith
constant
initializes exactly
one
variable
or
array
element.
C.2.2 Hollerith Constants In CALL Statements
An
actual
argument
in a
CALL
statement
can
be
a
Hollerith
constant,
so long as
the
corresponding
dummy
argument
has
type
integer, real,
or
logical. This
is
an
excep-
tion
to
the
rule
that
actual
and
dummy
arguments
must
agree
in type.
C-l