Intel® Fortran Compiler 16.0 User and Reference Guide

Complex Data Types

Complex data types can be specified as follows:

COMPLEX

COMPLEX([KIND=]n)

COMPLEX*s

DOUBLE COMPLEX

n

Is an initialization expression that evaluates to kind 4, 8, or 16.

s

Is 8, 16, or 32. COMPLEX(4) is specified as COMPLEX*8; COMPLEX(8) is specified as COMPLEX*16; COMPLEX(16) is specified as COMPLEX*32.

If a kind parameter is specified, the complex constant has the kind specified. If no kind parameter is specified, the kind of both parts is default real, and the constant is of type default complex.

Default real is affected by compiler option real-size and by the REAL directive.

The default KIND for DOUBLE COMPLEX is affected by compiler option double-size. If the compiler option is not specified, default DOUBLE COMPLEX is COMPLEX(8).

No kind parameter is permitted for data declared with type DOUBLE COMPLEX.

Examples

The following examples show how complex variables can be declared.

An entity-oriented example is:

 COMPLEX (4), DIMENSION (8) :: cz, cq 

An attribute-oriented example is:

 COMPLEX(4) cz, cq
 DIMENSION(8) cz, cq

See Also