comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Bit manipulation facilities in Ada
Date: 1998/11/23
Date: 1998-11-23T00:00:00+00:00	[thread overview]
Message-ID: <73c4qj$sps$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 36575D47.43905794@bellsouth.net

In article <36575D47.43905794@bellsouth.net>,
  The Ludwig Family <ludwigs@bellsouth.net> wrote:
> Look in the index for "modular integers" and look under "arrays", in
> particular one-dimensional boolean arrays.  For both of these categories,
> the operators "and", "or", "xor", and "not" are available.

This point is worth emphasising, as it seems to be suprisingly little-known.
This feature is very important for writing C and OS bindings as well. Create
yourself an enumerated type with suitably descriptive names for each bit. Then
create a packed array of booleans indexed by that type, and suddenly bit field
operations actually become readable.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  reply	other threads:[~1998-11-23  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-21  0:00 Bit manipulation facilities in Ada Robert T. Sagris
1998-11-21  0:00 ` Srinivasan, R
1998-11-22  0:00   ` dewarr
1998-11-22  0:00     ` Simon Wright
1998-11-23  0:00       ` dewarr
1998-11-24  0:00         ` P.S. Norby
1998-11-23  0:00     ` Marin David Condic
1998-11-24  0:00     ` Ole-Hjalmar Kristensen
1998-11-24  0:00       ` John McCabe
1998-11-22  0:00 ` Matthew Heaney
1998-11-22  0:00   ` dewarr
1998-11-22  0:00 ` The Ludwig Family
1998-11-23  0:00   ` dennison [this message]
1998-11-22  0:00 ` Robert T. Sagris
1998-11-23  0:00 ` Robert I. Eachus
1998-11-24  0:00 ` Stephen Leake
replies disabled

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