HP Fortran Programmer's Reference (September 2007)

Data types and data objects
Intrinsic data types
Chapter 5 107
Intrinsic data types
The intrinsic data types are the data types predefined by the HP Fortran language, in
contrast with derived types, which are user-defined (see “Derived types” on page 123). The
intrinsic data types include numeric types:
Integer
Real
Complex
and nonnumeric types:
Character
Logical
Each type allows the specification of a kind parameter to select a data representation for that
type (see “Type declaration for intrinsic types” on page 109 for the format of the kind
parameter). If the kind parameter is not specified, each type has a default data
representation. Table 5-1 identifies the data representation for each type, including the
default case where a kind parameter is not specified. The types are listed by keyword and
applicable kind parameter. The table also includes the data representation for the HP
extensions, BYTE and DOUBLE COMPLEX.
As shown in Table 5-1, HP Fortran aligns data on natural boundaries. Entities of the intrinsic
data types are aligned in memory on byte boundaries of 1, 2, 4, or 8, depending on their size.
Array variables are aligned on an address that is a multiple of the alignment required for the
scalar variable with the same type and kind parameters.
NOTE The ASCII character set uses only the values 0 to 127 (7 bits), but the
HP Fortran implementation allows use of all 8 bits of a character entity. The
processing of character sets requiring multibyte representation for each
character makes use of all 8 bits.
For additional information about data representation models, see “Data representation
models” on page 507.
Table 5-1 Intrinsic data types
Type Range of values
Precision (in
decimal digits)
Bytes Alignment