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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,553a6b79b2471571 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How do you bitwise operations in Ada '83 and '95 Date: 19 Jul 2006 10:20:40 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1153244316.853254.291560@m79g2000cwm.googlegroups.com> <1153248800.834457.183940@p79g2000cwp.googlegroups.com> <1153258362.266358.15200@h48g2000cwc.googlegroups.com> <1153281313.491512.88760@75g2000cwc.googlegroups.com> <1153313832.389434.144930@s13g2000cwa.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1153318844 17576 192.74.137.71 (19 Jul 2006 14:20:41 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 19 Jul 2006 14:20:41 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news2.google.com comp.lang.ada:5812 Date: 2006-07-19T10:20:40-04:00 List-Id: "Chris L" writes: > Jeffrey R. Carter wrote: > > However, you raise an important point, and that is that we should ask > > the OP what he is trying to achieve. > > Jeff, my intent was to investigate and develop a working Ada library > corresponding to the C source code bitwise operators: "&", "|", "<<", > ">>", etc. But Ada already has these things for modular types (and for packed arrays of boolean, which is really a higher-level feature), so why do you want to create such a library? By the way, since we're arguing about terminology, I do not consider the shift operators to be "bitwise". To me, the bitwise logical operators are the ones that operator independently on the bits of an operand (for "not"), or corresponding pairs of bits (for "and", "or", and "xor"). In other words, the value of bit number N of the operand(s) affects ONLY the value of bit number N of the result. - Bob