Hollerith data is not part of the Fortran standard although it was included in
Fortran 66. In FTN95 they have been implemented as extensions to the Standard
for compatibility with FTN77. Occurrences of Hollerith data are flagged as a
warning by the compiler. New programs should not use these two extensions.
Note: Hollerith editing in formats is still part of the Standard.
is equivalent to:
Hollerith data is stored as two 8-bit characters per word, any unused character
positions being blank-filled.
The number of characters contained by each type of variable is as follows:
Hollerith data is allowed in FTN95 as follows:
In DATA statements for variables and arrays of type INTEGER and REAL. For
INTEGER(3) :: IB(2)
Note that apostrophes can be used as an alternative
to the nH form.
As data read by READ and WRITE statements; for example:
An Aw edit descriptor is used to specify that
ASCII characters are to be read into or written from the specified variables
which may be of type INTEGER, REAL, DOUBLE PRECISION or LOGICAL. FTN95 allows
the form A (alone) where w is assumed to be the number of ASCII
characters that will fit into the variable in the input/output list. For
REAL(1) :: R
LOGICAL(3) :: L
would read, from a single record, 2 characters into
I, 4 characters into R and 4 characters into L.
In assignment statements where the left hand side is an arithmetic variable or
array element, for example:
R = '1234'
Note the use of apostrophes in these examples.
In subroutine calls or function references, for example:
I = RS(1HA,8)
A run-time error will be generated when using the
compile-time option /CHECK, if a Hollerith string is passed as an actual
routine argument and the corresponding dummy argument is not of type CHARACTER.