HP Fortran Programmer's Reference (September 2007)

Data types and data objects
Intrinsic data types
Chapter 5114
Constants
Constants can be either literal or named. A literal constant is a sequence of characters that
represents a value. A named constant is a variable that has been initialized and has the
PARAMETER attribute. This section describes the formats of literal constants for each of the
intrinsic data types. For more information about named constants and the PARAMETER
statement and attribute, see Chapter 10.
Integer constants
The format of a signed integer literal constant is:
[
sign
]
digit-string
[_
kind-parameter
]
sign
is either + or -.
digit-string
takes the form:
digit
[
digit
] ...
kind-parameter
is one of:
digit-string
the name of a scalar integer constant
The following are examples of integer constants:
-123
123_1
123_ILEN
In the last example, ILEN is a named integer constant used as a kind parameter. It must have
a value of 1, 2, 4, or 8.
BOZ constants
Fortran 90 allows DATA statements to include constants that are formatted in binary, octal, or
hexadecimal base. Such constants are called BOZ constants.
A binary constant is:
leading-letter
{'
digit-string
'|"
digit-string
"}