Re: Common --- question
From: Tom McGlynn (tam_at_lheapop.gsfc.nasa.gov)
Date: 10/20/04
- Next message: Rich Townsend: "Re: Exciting new feature for g95"
- Previous message: Madhusudan Singh: "Re: Exciting new feature for g95"
- In reply to: glen herrmannsfeldt: "Re: Common --- question"
- Next in thread: Richard E Maine: "Re: Common --- question"
- Reply: Richard E Maine: "Re: Common --- question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 20 Oct 2004 13:54:08 -0400
glen herrmannsfeldt wrote:
>
>
> Richard E Maine wrote:
>
>> Tom McGlynn <tam@lheapop.gsfc.nasa.gov> writes:
>
>
> I wrote:
>
>>>> COMMON isn't padded,...
>
>
>>> Is that true? I thought that as long as the compiler was consistent
>>> it could add padding? E.g., it could align everything on 8 byte
>>> boundaries. Been a while since I've used common much though.
>
>
>> The "as long as the compiler was consistent" part is a really huge
>> caveat. In many ways, COMMON is incredibly complicated.
>
>
... many examples by Richard and Greg about how it's difficult to
pad common elided.
If I can expose my ignorance a little further: How does this
work when types are defined using kind variables?
As I understand the space rules:
Double precision is required to take twice as much space
as the default real.
Default reals, integers and logicals need to take the same amount of space
Complex numbers take twice as much space as the corresponding reals
But I don't know of any rules that apply to variables defined with
an explicit kind.
But how does one know how much space a REAL(kind=m) takes versus
a REAL(kind=n)? Or INTEGER or LOGICAL? I gather that there are
compilers with a 10-byte real. If I have such a real how
does the standard permit overlaying it with other types using
equivalence or common? Or is this like mixing in character variables
and forbidden in some way?
Regards,
Tom McGlynn
- Next message: Rich Townsend: "Re: Exciting new feature for g95"
- Previous message: Madhusudan Singh: "Re: Exciting new feature for g95"
- In reply to: glen herrmannsfeldt: "Re: Common --- question"
- Next in thread: Richard E Maine: "Re: Common --- question"
- Reply: Richard E Maine: "Re: Common --- question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|