NAG Fortran Compiler, Release 7.2: Data Types

Navigation: Previous Up Next

## 2.17 Data Types

The table below lists the intrinsic data types provided by the NAG Fortran Compiler together with their kind numbers. There are three possible schemes for the intrinsic kind type parameters: the default mode of operation (which may be specified explicitly by the -kind=sequential option), the “byte” numbering scheme (specified by the -kind=byte option) and the “unique” numbering scheme (specified by the -kind=unique).

Type | KIND Number | KIND Number | KIND Number | Name | Description
Name | (sequential) | (byte) | (unique) |  |
`REAL` | 1 | 4 | 301 | `REAL32`* | Single precision floating-point
`REAL` | 2 | 8 | 302 | `REAL64`* | Double precision floating-point
`REAL` | 3 | 16 | 303 | `REAL128`* | Quad precision floating-point
`REAL` | 16 | 2 | 304 | `REAL16`* | Half precision floating-point
`COMPLEX` | 1 | 4 | 301 | `REAL32`* | Single precision complex
`COMPLEX` | 2 | 8 | 302 | `REAL64`* | Double precision complex
`COMPLEX` | 3 | 16 | 303 | `REAL128`* | Quadruple precision complex
`COMPLEX` | 16 | 2 | 304 | `REAL16`* | Half precision complex
`LOGICAL` | 1 | 1 | 201 | `BYTE` | Single byte logical
`LOGICAL` | 2 | 2 | 202 | `TWOBYTE` | Double byte logical
`LOGICAL` | 3 | 4 | 203 | `WORD` | Default logical
`LOGICAL` | 4 | 8 | 204 | `LOGICAL64` | Eight byte logical
`INTEGER` | 1 | 1 | 101 | `INT8`* | 8-bit integer
`INTEGER` | 2 | 2 | 102 | `INT16`* | 16-bit integer
`INTEGER` | 3 | 4 | 103 | `INT32`* | 32-bit (default) integer
`INTEGER` | 4 | 8 | 104 | `INT64`* | 64-bit integer
`CHARACTER` | 1 | 1 | 646 | `ASCII` | ASCII or ISO 8859-1 character
`CHARACTER` | 2 | 2 | 213 | `JIS` | JIS X 0213 character
`CHARACTER` | 3 | 3 | 5323 | `UCS2` | Unicode (UCS-2) character
`CHARACTER` | 4 | 4 | 10646 | `UCS4` | ISO 10646 (UCS-4) character

The Name column of the table indicates the name provided by the intrinsic module `F90_KIND`; the ones marked * are also provided by the standard intrinsic module `ISO_FORTRAN_ENV`. Using these names avoids the portability problems that arise if the kind numbers are hard-coded.

Note that on all machines except Sun Solaris with the SunPro C compiler, quadruple precision is actually “double double” precision; this provides nearly twice the precision of Double precision but with a reduced exponent range.