From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f752883594af27e3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-25 18:55:23 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: pragma pack in external packages Date: 25 Apr 2002 18:55:22 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0204251755.57eeef15@posting.google.com> References: NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1019786122 22945 127.0.0.1 (26 Apr 2002 01:55:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 26 Apr 2002 01:55:22 GMT Xref: archiver1.google.com comp.lang.ada:23128 Date: 2002-04-26T01:55:22+00:00 List-Id: "Pat Rogers" wrote in message news: 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 :-)