comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: bit operations on integers
Date: 1999/05/03
Date: 1999-05-04T01:01:01+00:00	[thread overview]
Message-ID: <yecwvypd4xe.fsf@king.cts.com> (raw)
In-Reply-To: 7gkr2g$k5g@hobbes.crc.com

"David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> 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  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center  <http://www.sdsc.edu>                 <*>
Techno-geek.  Mouse bigger than phone.  Bites heads off virtual chickens.




  reply	other threads:[~1999-05-03  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-03  0:00 bit operations on integers phadreus
1999-05-03  0:00 ` David C. Hoos, Sr.
1999-05-03  0:00   ` Keith Thompson [this message]
1999-05-03  0:00 ` Jerry Petrey
1999-05-03  0:00 ` Matthew Heaney
1999-05-03  0:00   ` dennison
1999-05-04  0:00 ` Vincent P. Amiot
replies disabled

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