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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b657b1c99e7e7039 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: bit numbers in packed arrays of Boolean Date: Thu, 2 Sep 2010 15:09:27 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <82r5hfghjr.fsf@stephe-leake.org> <8e4b6rF1dlU1@mid.individual.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1283458169 21875 69.95.181.76 (2 Sep 2010 20:09:29 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 2 Sep 2010 20:09:29 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-RFC2646: Format=Flowed; Response Xref: g2news1.google.com comp.lang.ada:13918 Date: 2010-09-02T15:09:27-05:00 List-Id: "Niklas Holsti" wrote in message news:8e4b6rF1dlU1@mid.individual.net... ... >> Is this bit order required by some other clause? > > I believe not. This is one reason why, when I need to access specific bits > in a word, I prefer to use Unsigned_xx types and their masking and > shifting operations, not packed arrays. I use packed arrays only when the > index order does not matter (or when portability does not matter, which is > basically never). I don't think so, either. I've generally used a record type (with a record representation clause) if I care where the bits are. This would be a bit annoying in this case (16 distinct components), but often I've found that you don't really need the conversion in the first place if you have an appropriately represented record. YMMV. Randy.