From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7b85ed8e46786486 X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Bit manipulation in Ada Date: 1999/02/04 Message-ID: <36B9AE9C.DBD672A@pwfl.com>#1/1 X-Deja-AN: 440593618 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <79bvb3$99p$1@nnrp1.dejanews.com> <79c2r3$8ga@hobbes.crc.com> Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada Date: 1999-02-04T00:00:00+00:00 List-Id: 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