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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,70ff6d6e203062f6,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-22 17:58:59 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newsread.com!newsstand.newsread.com!POSTED.newshog.newsread.com!not-for-mail From: Peter C. Chapin Newsgroups: comp.lang.ada Subject: Newbie question: How does one do bit manipulation in Ada? Message-ID: Organization: Kelsey Mountain Software X-Newsreader: MicroPlanet Gravity v2.50 Date: Tue, 23 Dec 2003 01:58:56 GMT NNTP-Posting-Host: 216.114.160.145 X-Complaints-To: Abuse Role , We Care X-Trace: newshog.newsread.com 1072144736 216.114.160.145 (Mon, 22 Dec 2003 20:58:56 EST) NNTP-Posting-Date: Mon, 22 Dec 2003 20:58:56 EST Xref: archiver1.google.com comp.lang.ada:3730 Date: 2003-12-23T01:58:56+00:00 List-Id: Hello! I'm a C/C++ programmer in the process of teaching myself Ada. I've been writing toy programs to get a feeling for the language. There is obviously a lot to learn, but I'm enjoying myself. Anyway, I have a need to do some bit manipulations in one of my programs. In particular I want to invert certain bits in a number (integer). I'm used to doing this with a bitwise XOR operator (C/C++) so I looked around for some kind of equivalent in Ada but I didn't find anything in package Standard or in any of the "usual" library packages. Am I missing something or am I just thinking about this wrong? Thanks! Peter