Harvey Richardson wrote:
>>> 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.
I think one of the others who expressed a similar view to yours was Richard
Maine.
If this is true about the "oversight" in the F90/F95(?) standard, then
potentially a lot of code could be broken by a new "compiler vendor kid on the
block" and maintaining compliance to the standard.
Be they good practices or not, many engineering programs have been written with
equivalence to the real and imaginary parts of complex numbers. I can remember
instances from my youth, when good programming practices were those that used
every devious trick I could invent.
If this is an oversight (and before BG decides to go into the new "standard" BG
Fortran compiler), is there a mechanism to correct this before potential harm?
Regards, Paddy
Paddy O'Brien,
Transmission Development,
TransGrid,
PO Box A1000, Sydney South,
NSW 2000, Australia
Tel: +61 2 9284-3063
Fax: +61 2 9284-3050
Email: [log in to unmask]
Either "\'" or "\s" (to escape the apostrophe) seems to work for most people,
but that little whizz-bang apostrophe gives me little spam.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|