CMPLX(X, Y, KIND)

Purpose

Convert to complex type.

Class

Elemental function

Argument Type and Attributes

X
must be of type integer, real, or complex.

Y (optional)
must be of type integer or real. It must not be present if X is of type complex.

KIND (optional)
must be a scalar integer initialization expression.

Result Type and Attributes

Result Value

Examples

CMPLX (-3) has the value (-3.0, 0.0).


Specific Name Argument Type Result Type Pass As Arg?
CMPLX (1) default real default complex no

Notes:

  1. IBM Extension.

Related Information

DCMPLX(X, Y), QCMPLX(X, Y). IBM Copyright 2003