6.1.13. Hollerith constants support

6.1.13 Hollerith constants support

GNU Fortran supports Hollerith constants in assignments, function arguments, and DATA and ASSIGN statements. A Hollerith constant is written as a string of characters preceded by an integer constant indicating the character count, and the letter H or h, and stored in bytewise fashion in a numeric (INTEGER, REAL, or complex) or LOGICAL variable. The constant will be padded or truncated to fit the size of the variable in which it is stored.

Examples of valid uses of Hollerith constants:

complex*16 x(2)
data x /16Habcdefghijklmnop, 16Hqrstuvwxyz012345/
x(1) = 16HABCDEFGHIJKLMNOP
call foo (4h abc)

Invalid Hollerith constants examples: