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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e8b01e86b2d0a470 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: how to do bit-wise operation on none modular types? Date: 1999/03/03 Message-ID: #1/1 X-Deja-AN: 450946100 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <7bjjck$25t7@news1.newsguy.com> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1999-03-03T00:00:00+00:00 List-Id: Samuel Mize (smize@imagin.net) wrote: : Do you get some advantage from the "more direct route" that compensates : for it being somewhat less clear? I would expect the type conversion : to be a "view conversion" (terminology check) and so not to require : a copy, so both code fragments would be equally efficient. Personally, I find "X mod 16#10000#" *more* clear than "X and 16#FFFF#" because bitwise "and" is working on the representation, whereas "mod" is working on the value, but vive la difference. Note that "mod" works properly whether X is negative or positive. : Best, : Sam Mize -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA