REAL function, the KIND= value of the type being that of argument Z.
COMPLEX; scalar; INTENT(IN).
The imaginary part of Z is returned, without conversion.
Note: The way to do this in standard Fortran 90
However, when, for example, Z is
AIMAG(Z) means something different for some compilers
that are not true Fortran 90 compilers but offer some
extensions standardized by Fortran 90 (such as the
DOUBLE COMPLEX type, also known as
The advantage of
IMAGPART() is that, while not necessarily
more or less portable than
AIMAG(), it is more likely to
cause a compiler that doesn't support it to produce a diagnostic
than generate incorrect code.
See REAL() and AIMAG() of Complex, for more information.