HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11534
ICHAR(CHAR(I, KIND(C))) must have the value I for 0 <= I <=
n
-1 and CHAR(ICHAR(C),
KIND(C)) must have the value C for any character C capable of representation in the
processor.
CMPLX(X, Y, KIND)
Optional arguments
Y, KIND
Description
Convert to complex type.
Class
Elemental function.
Arguments
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/
type parameters
The result is of type complex. If KIND is present, the kind type parameter is that specified by
KIND; otherwise, the kind type parameter is that of default real type.
Result value
•IfY is absent and X is not complex, it is as if Y were present with the value zero.
•IfY is absent and X is complex, it is as if Y were present with the value AIMAG(X).
CMPLX(X,Y,KIND) has the complex value whose real part is REAL(X,KIND) and whose
imaginary part is REAL(Y,KIND).