COMPLEX — Complex conversion function
COMPLEX(X, Y)returns a complex number where X is converted to the real component and Y is converted to the imaginary component.
RESULT = COMPLEX(X, Y)
X The type may be
Y The type may be
- Return value:
If X and Y are both of
INTEGERtype, then the return value is of default
If X and Y are of
REALtype, or one is of
REALtype and one is of
INTEGERtype, then the return value is of
COMPLEXtype with a kind equal to that of the
REALargument with the highest precision.
program test_complex integer :: i = 42 real :: x = 3.14 print *, complex(i, x) end program test_complex
- See also: