Code Sample


The C language does not have character strings. Instead, it has arrays of single characters, so this is how you must represent a character string in Fortran.

There is a kind value defined, C_CHAR, corresponding to the C char type. However, only character variables with a length of one (1) are interoperable.

COMPLEX(4) Constants

A COMPLEX(4) constant is a pair of integer or single-precision real constants that represent a complex number.

A COMPLEX(4) constant occupies eight bytes of memory and is interpreted as a complex number.

If the real and imaginary part of a complex literal constant are both real, the kind parameter value is that of the part with the greater decimal precision.

Subscribe to Code Sample