Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
The GNU Fortran language disallows
where expr is any
COMPLEX type other than
except when they are used in the following way:
The above forms explicitly specify that the desired effect
is to convert the real or imaginary part of expr, which might
REAL type other than
and have that serve as the value of the expression.
The GNU Fortran language offers clearly named intrinsics to extract the real and imaginary parts of a complex entity without any conversion:
To express the above using typical extended FORTRAN 77,
use the following constructs
(when expr is
The FORTRAN 77 language offers no way
to explicitly specify the real and imaginary parts of a complex expression of
arbitrary type, apparently as a result of requiring support for
COMPLEX type (
The concepts of converting an expression to type
of extracting the real part of a complex expression were
thus "smooshed" by FORTRAN 77 into a single intrinsic, since
they happened to have the exact same effect in that language
(due to having only one
Note: When `-ff90' is in effect,
g77 treats `REAL(expr)', where expr is of
COMPLEX, as `REALPART(expr)',
whereas with `-fugly-complex -fno-f90' in effect, it is
treated as `REAL(REALPART(expr))'.
See section 9.9.3 Ugly Complex Part Extraction, for more information.
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|