Allowing character literals to be used in a similar way to Hollerith constants
is a nonstandard extension. This feature is enabled using
-fdec-char-conversions and only applies to character literals of kind=1
.
Character literals can be used in DATA
statements and assignments with
numeric (INTEGER
, REAL
, or COMPLEX
) or LOGICAL
variables. Like Hollerith constants they are copied bytewise fashion. The
constant is padded with spaces or truncated to fit the size of the
variable in which it is stored.
Examples:
integer*4 x data x / 'abcd' / x = 'A' ! Is padded. x = 'ab1234' ! Is truncated.