comp.lang.ada
 help / color / mirror / Atom feed
* Pragma pack
@ 1997-03-10  0:00 C. Berg (602) 436-5290
  1997-03-11  0:00 ` Robert Dewar
  1997-03-17  0:00 ` Matthew Heaney
  0 siblings, 2 replies; 4+ messages in thread
From: C. Berg (602) 436-5290 @ 1997-03-10  0:00 UTC (permalink / raw)



I have some questions for the list Ada gods regarding the use of
pragma pack (this is from Ada '83 land).

If you have a record similar to the following:

 type blah is record
   field_1 : field_1_type;
   field_2 : field_2_type;
   <etc...>
 end record;

What is the difference (to an individual record like this) between
employing a pragma pack on this record alone, without packing its
component fields, and not using a pack at all?  For example, will
a variable declared to be of this record type be the exact same size
with only the "highest" level pack as with no packs at all?

Also, while I would assume that a 'Size attribute will dynamically
reflect the effect of pragma pack on a type, can anybody confirm to me
that this is actually true, and does the same go for the USE clause?

I realize that implementations of pragmas are more or less up the
compiler writers, so any input, rules of thumb, references, etc,
are welcome....

Thanks in advance,

- Cory
(any expressed opinions are mine alone, disclaimer, disclaimer....)




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-03-17  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-10  0:00 Pragma pack C. Berg (602) 436-5290
1997-03-11  0:00 ` Robert Dewar
1997-03-17  0:00 ` Matthew Heaney
1997-03-17  0:00   ` Robert Dewar

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