The
numeric types are INTEGER,
REAL, and COMPLEX;
the nonnumeric types are CHARACTER
and LOGICAL.
Each Fortran 90 implementation defines a set of representations
for each of these types. Each representation corresponds to a different
range of values that can be attained by entities or constants declared
to be of the corresponding type.
For
real and complex types, different representations also have different
levels of precision. Each representation is assigned an identifying
kind parameter, which is an integer value.
One of the representations for each type is designated the default
representation for that type. Table 3-1 “ Types and kind parameters ”
shows the options available with HP Fortran 90.
See also the "Data representation models"
section of Chapter 11.
Table 3-1 Types and kind parameters
Type | Kind parameter | Range | Bytes | Alignment |
| 1 | -128 to 127 | 1 | 1 |
| 2 | -215 to 215-1 | 2 | 2 |
| 4 (default) | -231 to 231-1 | 4 | 4 |
| 8 | -263 to 263-1 | 8 | 8 |
| 4 (default) | -3.402823x1038 to -1.175495x10-38 |
+1.175495x10-38 to +3.402823x1038 |
| 4 | 4 |
| 8 | -1.797693x10+308 to -2.225073x10-308 |
+2.225073x10-308 to +1.797693x10+308 |
| 8 | 8 |
| 16 | -1.189731x10+4932 to -3.362103x10-4932 |
+3.362103x10-4932 to +1.189731x10+4932 |
| 16 | 8 |
| 4 (default) | same as for REAL(4) | 8 | 4 |
| 8 | same as for REAL(8) | 16 | 8 |
| 1 (default) | ASCII character set [1] | 1 | 1 |
| 1 | .TRUE. .FALSE. [2] | 1 | 1 |
| 2 | .TRUE. .FALSE. (2) | 2 | 2 |
| 4 (default) | .TRUE. .FALSE. (2) | 4 | 4 |
| 8 | .TRUE.
.FALSE. (2) | 8 | 8 |
The kind parameter for an intrinsic data type is the same
as the storage requirements for that data type except for COMPLEX
where the kind parameter is the kind parameter of the real or imaginary
part.
Following are examples of simple type declarations:
! i and j are default 4-byte integers |
! a is a 5x5 array of default reals |
! c10 is a variable of 10 characters |