comp.lang.ada
 help / color / mirror / Atom feed
From: Sandro Binetti <sandrobinetti@my-deja.com>
Subject: Re: Bit manipulation
Date: Wed, 08 Nov 2000 07:18:53 GMT
Date: 2000-11-08T07:18:53+00:00	[thread overview]
Message-ID: <8uauos$vrf$1@nnrp1.deja.com> (raw)
In-Reply-To: 2WTH$pdrCfOd@eisner.decus.org

In article <2WTH$pdrCfOd@eisner.decus.org>,
  Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) wrote:

> Quite often when someone wants to do something like that, they had
> formerly programmed in some other language whose ability to define
> data types is not so robust as Ada.

Ok! I'm a C programmer too. Why do you say "robust"? You can write
a "robust" source code even by using other languages than ADA. The
matter is not that. In this case I'd say "flexible", instead of "not
robust".

I always discriminate a data structure in two indipendent points of
wiew:
1) the semantic one (the type, of course)
2) the sintactic one (the way the type is stored and internally
represented)
In some occasion, expecially when you work at low-level device
handling, you need to approach the problem by a semantic (logic) way,
without forgetting that your "idea" has a peculiar way to be treated on
the target hardware (and, so, it can't be completely divided from the
sintactic approach). That's to say that, in such an occasion like
these, there no need (and no meaning) to split the type from its
internal representation: it's only a conceptual overhead!

>
> Except for the particular situation of changing case of an ASCII
> Roman letter (for which Ada95 has built-in capabilities), flipping
> a bit in a character is totally meaningless.

Are you sure? Can you say there'no situation at all in witch you need
to manipulate a seven-bit character, regardless of its ASCII semantic?
Have you ever thougth of some encryption-encoding algorithm, based on
some perverse actions on a character bit?

>
> If you really meant to blip a bit in a data cell that happens to
> be 8 bits wide, then please study record and array declarations
> in an introductory Ada text

Done, when I was 18!

Thanks a lot for your interest in my "stupid" problem.
--
Ciao, Sandro


Sent via Deja.com http://www.deja.com/
Before you buy.



  parent reply	other threads:[~2000-11-08  7:18 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-07  0:00 Bit manipulation Sandro Binetti
2000-11-07  0:00 ` Larry Kilgallen
2000-11-07  0:00   ` John English
2000-11-08  0:00   ` gdemont
2000-11-08  0:00     ` Robert Dewar
2000-11-08  0:00       ` gdemont
2000-11-08  0:00         ` Larry Kilgallen
2000-11-09  4:50           ` Robert Dewar
2000-11-10  0:00             ` Lao Xiao Hai
2000-11-09  4:47         ` Robert Dewar
2000-11-09  0:00           ` gdemont
2000-11-08  0:00       ` Sandro Binetti
2000-11-08  0:00         ` Dale Stanbrough
2000-11-09  0:00           ` Sandro Binetti
2000-11-09  0:00             ` gdemont
2000-11-09  0:00             ` Ken Garlington
2000-11-10  0:00             ` Scott Ingram
2000-11-08  0:00         ` Nicolas Brunot
2000-11-08  0:00         ` gdemont
2000-11-09  4:00           ` Ken Garlington
2000-11-09  0:00             ` Larry Kilgallen
2000-11-09  0:00               ` Ken Garlington
2000-11-09  3:59         ` Ken Garlington
2000-11-09  4:52         ` Robert Dewar
2000-11-11  0:00       ` Redryder
2000-11-11  0:00         ` Jeff Carter
2000-11-11  0:00           ` Redryder
2000-11-12  2:07             ` Ken Garlington
2000-11-12  5:56             ` Jeff Carter
2000-11-12  0:00               ` Robert Dewar
2000-11-12  0:00                 ` tmoran
2000-11-13  0:00                   ` Robert Dewar
2000-11-14  0:00                     ` Marc A. Criley
2000-11-13  0:54                   ` Ken Garlington
2000-11-12  6:40               ` tmoran
2000-11-13  0:00         ` Lutz Donnerhacke
2000-11-13  0:00           ` Robert Dewar
2000-11-13  0:00             ` Lutz Donnerhacke
2000-11-13  0:00               ` Robert Dewar
2000-11-13  0:00                 ` Lutz Donnerhacke
2000-11-13  0:00           ` Robert Dewar
2000-11-13  0:00             ` Lutz Donnerhacke
2000-11-13  0:00               ` Robert Dewar
2000-11-13  0:00                 ` Lutz Donnerhacke
2000-11-13  0:00                   ` Pat Rogers
2000-11-13  0:00                     ` Brian Rogoff
2000-11-13  0:00                       ` Pat Rogers
2000-11-13  0:00                       ` F. Britt Snodgrass
2000-11-15  0:00                         ` Lutz Donnerhacke
2000-11-14  0:00                       ` Georg Bauhaus
2000-11-15  0:00                         ` Lutz Donnerhacke
2000-11-14  0:00                   ` Martin Dowie
2000-11-15  0:00                     ` Lutz Donnerhacke
2000-11-20  0:00                 ` Randy Brukardt
2000-11-21  0:00                   ` Lutz Donnerhacke
2000-11-21  0:00                     ` Stephen Leake
2000-11-22  0:00                       ` Lutz Donnerhacke
2000-11-08  7:18   ` Sandro Binetti [this message]
2000-11-07  0:00 ` gdemont
2000-11-08  7:22   ` Sandro Binetti
2000-11-10  7:24 ` Thank you all for your contribution ! Sandro Binetti
  -- strict thread matches above, loose matches on Subject: below --
2005-02-07 12:37 Bit manipulation Maurizio
2005-02-07 13:20 ` Martin Krischik
2005-02-07 15:32 ` Martin Dowie
2005-02-07 18:04   ` Martin Krischik
2005-02-08  0:32 ` Randy Brukardt
2005-02-08  3:11 ` Steve
2005-02-08 18:51   ` tmoran
1999-04-04  0:00 bit manipulation Jack Chow
1999-04-04  0:00 ` Matthew Heaney
1999-04-05  0:00 ` dennison
replies disabled

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