> >> The Fortran 90 standard says
> >>
> >> "In a storage association context
> >> ...
> >> A nonpointer scalar object of type double precision real or
> >> default complex occupies two contiguous numeric storage units."
> >>
> >> so you could use COMMON or EQUIVALENCE to have a real arrays
> >> mapped to the complex array.
> >
> >In which order are the real and imaginary parts of each complex number stored?
>
> I don't know but I'll answer the question "which of the numeric
> storage units contain the real and imaginary parts?"...
>
> For Fortran 77 the first is real and the second imaginary.
>
> When I wrote the above I did not realise that the Fortran 90 standard
> does not contain the text that states this in the Fortran 77 standard
> (4.6). At least I (and others) couldn't find it.
See 4.3.1.3:
The complex type has values that approximate the mathematical complex
numbers. The values of a complex type are ordered pairs of real
values. The first real value is called the real part, and the second
real value is called the imaginary part.
John Reid.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|