comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <condicma@bogon.pwfl.com>
Subject: Re: Bit manipulation in Ada
Date: 1999/02/04
Date: 1999-02-04T00:00:00+00:00	[thread overview]
Message-ID: <36B9AE9C.DBD672A@pwfl.com> (raw)
In-Reply-To: 79c2r3$8ga@hobbes.crc.com

David C. Hoos, Sr. wrote:
> 
> Following this message is the section from the Ada Language Reference
> Manual, dealing with your question.
> 
We might also observe that section 4.5.1 of the ARM could be useful in
this respect in that it provides for the logical operators on modular
and array types.

I'd like to observe that the original poster refers to using "a lot" of
bit manipulations and that this might suggest that the wrong approach is
being taken. I've done some "bit twiddling" down at the hardware
interface level of various systems, but it has always been fairly
isolated and a small part of the overall system. I've also seen C
programmers performing bit manipulations to achieve effects that in
other languages (like Ada) have simpler expressions. It is typically
done because that is "The C Way" of handling things, but to do it
identically in Ada may be avoiding "The Ada Way" of doing business.

Obviously, if you need the bit manipulation it is there. But it isn't
always the most straightforward expression if your language is Ada.

MDC
-- 
Marin David Condic
Real Time & Embedded Systems, Propulsion Systems Analysis
United Technologies, Pratt & Whitney, Large Military Engines
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
Ph: 561.796.8997         Fx: 561.796.4669
***To reply, remove "bogon" from the domain name.***

"Government is not reason. It is not eloquence. It is a force. 
Like fire, a dangerous servant and a fearful master."

    --  George Washington




  reply	other threads:[~1999-02-04  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-04  0:00 Bit manipulation in Ada msnata
1999-02-04  0:00 ` David C. Hoos, Sr.
1999-02-04  0:00   ` Marin David Condic [this message]
1999-02-04  0:00 ` bourguet
replies disabled

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