comp.lang.ada
 help / color / mirror / Atom feed
From: claveman@fern.mil (Charles H. Sampson)
Subject: Re: Packing Records Using Size Attribute Definitions Clauses
Date: 1998/11/30
Date: 1998-11-30T00:00:00+00:00	[thread overview]
Message-ID: <1djbqm0.6p06zijzpi0oN@u2n207167116164.inetworld.net> (raw)
In-Reply-To: 01be158e$fc0e7da0$0e2915c0@w95

     Many thanks to all for these responses.  In particular, Tucker's 
reference to 13.3(53) seems to be the crucial point I was missing, at 
least after I ran down what "internal layout" means.

     I certainly have no disagreement with the main point made, that a 
size clause is not the way to cause records to be packed.  (I inherited
the code I'm porting, so it can't be blamed on me.)  I never understood
the purpose of that feature of Ada 83.  I can't conceive of a case in 
which I would want to specify the amount of memory allocated to a record
but I wouldn't particularly care where its components were.  Can anybody
think of a use for such a thing?

     On the other hand, I disagree with Robert's assertion that packing
by means of size clauses was not intended in Ada 83.  Certainly he is 
far more qualified than I to speak of intent, being active while the de-
tails of the language were being hammered out.  I have to rely on what 
was written in the LRM and when I read, "The value of the expression 
specifies an upper bound for the number of bits to be allocated to ob-
jects of the type ..." and "A size specification for a composite type 
may affect the size of the gaps between the storage areas allocated to 
consecutive components" it sounds a lot like packing.  (He does refer to
an AI on the subject and AI-0553 looks like it might be the one, based 
on its title.  I'd like to read it, but I can't find it.  Are they still
available somewhere?  I deleted those I had only a few months ago.)

     Whatever.  The upshot is that I have an unexpected source change to
make while I'm porting the code.  Not a big thing, but something of a 
surprise.

                                Charlie

-- 
     For an email response, my user name is "sampson" and my host
is "spawar.navy.mil".




      reply	other threads:[~1998-11-30  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-18  0:00 Packing Records Using Size Attribute Definitions Clauses Charles H. Sampson
1998-11-19  0:00 ` Tucker Taft
1998-11-21  0:00   ` dewarr
1998-11-21  0:00     ` bob
1998-11-30  0:00       ` Charles H. Sampson [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox