Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

COMPLEX Statement

Statement: Specifies the COMPLEX data type.

COMPLEX

COMPLEX([KIND=] n)

COMPLEX*s

DOUBLE COMPLEX

n

Is 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.

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

Example
COMPLEX ch
COMPLEX (KIND=4),PRIVATE :: zz, yy   !equivalent to COMPLEX*8 zz, yy
COMPLEX(8) ax, by        !equivalent to COMPLEX*16 ax, by
COMPLEX (kind(4)) y(10)
complex (kind=8)  x, z(10)