comp.lang.ada
 help / color / mirror / Atom feed
From: dewarr@my-dejanews.com
Subject: Re: Boolean Representation
Date: 1998/09/25
Date: 1998-09-25T00:00:00+00:00	[thread overview]
Message-ID: <6uen3a$f72$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 6ue3uh$qjo$1@nnrp1.dejanews.com

In article <6ue3uh$qjo$1@nnrp1.dejanews.com>,
  matthew_snyder@my-dejanews.com wrote:
> The reason for my original question is that I'm trying to decide the best
> (most portable) way to convert an UNSIGNED_8 to a record type which provides
> access to the individual bits.


ALWAYS ask what you really have in mind, don't abstract it
to something you think is similar. An unchecked conversion
of an unsigned_8 type to a packed record with 8 boolean
fields most certainly is perfectly reasonable, and has
nothing to do with converting a stand alone boolean to an
integer as implied by your original question.

Note however that it will likely be implementation dependent
(e.g. endian dependent) which order the bits come out in in
the resulting packed record.

There is no advantage in using your own type instead of
Boolean, you definitely know that when a Boolean is forced
to be represented in 1 bit, then 0 is false and 1 is true.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




  parent reply	other threads:[~1998-09-25  0:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-24  0:00 Boolean Representation matthew_snyder
1998-09-24  0:00 ` dewarr
1998-09-24  0:00   ` Samuel T. Harris
1998-09-25  0:00     ` dewarr
1998-09-27  0:00       ` Samuel T. Harris
1998-09-28  0:00         ` dewar
1998-09-24  0:00   ` matthew_snyder
1998-09-24  0:00     ` dennison
1998-09-24  0:00     ` Tom Moran
1998-09-25  0:00       ` dewarr
1998-09-25  0:00         ` Tom Moran
1998-09-25  0:00     ` Robert I. Eachus
1998-09-25  0:00     ` dewarr [this message]
1998-09-24  0:00 ` dennison
1998-09-24  0:00   ` Keith Thompson
1998-09-25  0:00     ` dennison
1998-09-25  0:00       ` Keith Thompson
1998-09-26  0:00         ` Tucker Taft
1998-09-26  0:00           ` Keith Thompson
1998-09-27  0:00             ` null pointer representation (was: Boolean Representation) Arthur Evans Jr
1998-09-27  0:00               ` Keith Thompson
1998-09-28  0:00               ` dewarr
1998-09-28  0:00                 ` Lieven Marchand
1998-09-28  0:00                 ` Keith Thompson
1998-09-28  0:00                   ` dewarr
1998-09-30  0:00                     ` Keith Thompson
1998-10-02  0:00                       ` Robert I. Eachus
1998-09-27  0:00             ` Boolean Representation dewarr
1998-09-27  0:00           ` dewarr
  -- strict thread matches above, loose matches on Subject: below --
1998-09-24  0:00 matthew_snyder
1998-09-25  0:00 ` Tucker Taft
1998-09-25  0:00   ` dewarr
1998-09-25  0:00   ` dewarr
replies disabled

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