Re: Common --- question

From: Tom McGlynn (tam_at_lheapop.gsfc.nasa.gov)
Date: 10/20/04


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
        



Relevant Pages

  • Re: fortran95 error
    ... At a guess you are using a subroutine like: ... declarations I saw nothing that should have given the above error. ... or better yet in a separate COMMON of their own. ... they are all default reals. ...
    (comp.lang.fortran)
  • Re: fortran95 error
    ... At a guess you are using a subroutine like: ... declarations I saw nothing that should have given the above error. ... or better yet in a separate COMMON of their own. ... they are all default reals. ...
    (comp.lang.fortran)
  • Re: Standard integer types vs types
    ... The context could not be clearer. ... making claims like "the reals are a superset of the rationals". ... As did Richard Harter who started this mischaracterization of my ... That's what an isomorphism *IS*. ...
    (comp.lang.c)
  • Re: Why dont you ignorant fucks knock off the bullshit?
    ... crying shit of one lame ass trying to prove something to another lame ... ass...I have seen children who had more common f***in sense. ... "Most of us here at MTT think your real name is RICHARD BULLIS!" ... 2/22 "I kinda like the Rookie myself, and I feel he is misunderstood ...
    (misc.transport.trucking)
  • Re: Property of an equation
    ... To Deep: Let me replay some extracts from this thread to try to ... the concept of "no common factor" needs to be specified more clearly. ... Again I objected (quasi wrote): ... Let g and h be any two reals numbers. ...
    (sci.math)