comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: pragma pack in external packages
Date: 25 Apr 2002 18:55:22 -0700
Date: 2002-04-26T01:55:22+00:00	[thread overview]
Message-ID: <5ee5b646.0204251755.57eeef15@posting.google.com> (raw)
In-Reply-To: otYx8.27075$HQ2.1070251122@newssvr30.news.prodigy.com

"Pat Rogers" <progers@classwide.com> wrote in message news:<otYx8.27075$HQ2.1070251122@newssvr30.news.prodigy.com> In package Definitions, do something like this:
> 
>   type Bit is range 0 .. 1;
> 
>   for Bit'Size use 1;
> 
>   type Five_Bits is array( 1 .. 5 ) of Bit;
> 
>   for Five_Bits'Component_Size use 1;
> 
>   for Five_Bits'Size use 5;
> 
> 
> That is, use 'Component_Size instead of pragma Pack, and 
> take it out of the package More_Definitions too.

There is no reason to prefer Component_Size in this particular case,
since the RM guarantees a component size
of 1 from the use of pragma Pack in this case for any Annex
C compliant compiler (and if you don't have an annex C
compiler you can forget about using rep clauses anyway :-)

P.S. Pat and others, please don't quote entire messages.
We are getting more and more threads where every message
contains complete copies of the same thing. Even worse is
when two people play this game together and generate a
quadratic text expansion.

I seem to see far more of this these days. I assume the
problem is some microsoft software that automatically
insists on quoting entire messages, sigh :-)



  reply	other threads:[~2002-04-26  1:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-25 16:49 pragma pack in external packages Robert Quinn
2002-04-25 19:03 ` Stephen Leake
2002-04-25 19:07 ` Pat Rogers
2002-04-26  1:55   ` Robert Dewar [this message]
2002-04-26  1:52 ` Robert Dewar
replies disabled

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