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