Copyright (C) 2000-2012 |
GNU Info (g77-300.info)Complex IntrinsicComplex Intrinsic ................. Complex(REAL, IMAG) Complex: `COMPLEX' function, the exact type being the result of cross-promoting the types of all the arguments. REAL: `INTEGER' or `REAL'; scalar; INTENT(IN). IMAG: `INTEGER' or `REAL'; scalar; INTENT(IN). Intrinsic groups: `gnu'. Description: Returns a `COMPLEX' value that has `Real' and `Imag' as its real and imaginary parts, respectively. If REAL and IMAG are the same type, and that type is not `INTEGER', no data conversion is performed, and the type of the resulting value has the same kind value as the types of REAL and IMAG. If REAL and IMAG are not the same type, the usual type-promotion rules are applied to both, converting either or both to the appropriate `REAL' type. The type of the resulting value has the same kind value as the type to which both REAL and IMAG were converted, in this case. If REAL and IMAG are both `INTEGER', they are both converted to `REAL(KIND=1)', and the result of the `COMPLEX()' invocation is type `COMPLEX(KIND=1)'. _Note:_ The way to do this in standard Fortran 90 is too hairy to describe here, but it is important to note that `CMPLX(D1,D2)' returns a `COMPLEX(KIND=1)' result even if `D1' and `D2' are type `REAL(KIND=2)'. Hence the availability of `COMPLEX()' in GNU Fortran. automatically generated by info2www version 1.2.2.9 |