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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a84a01d2859560a0 X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: bit operations on integers Date: 1999/05/03 Message-ID: #1/1 X-Deja-AN: 473720688 References: <7gkhr7$5kr$1@nnrp1.dejanews.com> <7gkr2g$k5g@hobbes.crc.com> X-Complaints-To: usenet@nusku.cts.com X-Trace: nusku.cts.com 925779661 25239 198.68.168.21 (4 May 1999 01:01:01 GMT) Organization: CTS Network Services NNTP-Posting-Date: 4 May 1999 01:01:01 GMT Newsgroups: comp.lang.ada Date: 1999-05-04T01:01:01+00:00 List-Id: "David C. Hoos, Sr." writes: [...] > procedure Clear > (Item : in out Integer; > N : Natural) > is > Bits : Bit_Array; > for Bits use at Item'Address; > begin > Bits (N) := False; > end Clear; [...] In Ada 83, using an address clause to achieve an overlay is erroneous. (In Ada 95, it's erroneous only if it violates the properties of the type, or words to that effect.) At least one Ada 83 compiler issues a warning for such a construct. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Techno-geek. Mouse bigger than phone. Bites heads off virtual chickens.