Intel® Fortran Compiler 17.0 Developer Guide and Reference

Scalar Types

The commonly used types are included in the following table. The following applies:

Named constant from ISO_C_BINDING

(kind type parameter if value is positive)

C type

Equivalent Fortran type

C_SHORT

C_INT

C_LONG

C_LONG_LONG

short int

int

long int

long long int

INTEGER(KIND=2)

INTEGER(KIND=4)

INTEGER (KIND=4 or 8)

INTEGER(KIND=8)

C_SIGNED_CHAR

signed char

unsigned char

INTEGER(KIND=1)

C_SIZE_T

size_t

INTEGER(KIND=4 or 8)

C_INT8_T

C_INT16_T

C_INT32_T

C_INT64_T

int8_t

int16_t

int32_t

int64_t

INTEGER(KIND=1)

INTEGER(KIND=2)

INTEGER(KIND=4)

INTEGER(KIND=8)

C_FLOAT

C_DOUBLE

C_LONG_DOUBLE

float

double

long double

REAL(KIND=4)

REAL(KIND=8)

REAL(KIND=8 or 16)

C_FLOAT_COMPLEX

C_DOUBLE_COMPLEX

C_LONG_DOUBLE_COMPLEX

float _Complex

double _Complex

long double _Complex

COMPLEX(KIND=4)

COMPLEX(KIND=8)

COMPLEX(KIND=8 or 16)

C_BOOL

_Bool

LOGICAL(KIND=1)

C_CHAR

char

CHARACTER(LEN=1)

While there are named constants for all possible C types, every type is not necessarily supported on every processor. Lack of support is indicated by a negative value for the constant in the module.

For a character type to be interoperable, you must either omit the length type parameter or specify it using an initialization expression whose value is one.