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,1048aea26a740e29 X-Google-Attributes: gid103376,public From: Gautier Subject: Re: Bit operators Date: 2000/02/13 Message-ID: <38A6E631.234F3259@maths.unine.ch>#1/1 X-Deja-AN: 585361585 Content-Transfer-Encoding: 7bit References: <884o85$jjv$1@news.fsu.edu> <886feg$qgr$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 13 Feb 2000 17:12:00 +0100, mac13-32.unine.ch MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-02-13T00:00:00+00:00 List-Id: Robert Dewar wrote: > All the answers you got were inappropriate (a not uncommon > occurrence around here :-) :-) Thank you! We are looking forward for the Words of Wisdom! > You approached the problem with a "how-do-I-write-C-in-Ada" > viewpoint, and three people answered you to tell you how :-) Sorry, I only have a Basic, Pascal & Fortran background. Difficult to tell how to write C (or Cobol or...) in these conditions. You lend me (or us three) such criminal intentions ?! > But the proper answer is to use the features of Ada that allow > this to be done nicely without such nasty low level gizmos. What indicates you that Mr Grant doesn't know enumarated types and nice records and doesn't want to use them ? If he thought to try it in Ada, it was surely to make use of Ada's "+"es... It just seems to me that he has encountered the simple problem of performing the "AND" instruction that surely exists among the MIPS assembly instructions. That's all! How can you do easily without modular types ? Arrays of boolean is an alternative, perhaps cleaner. Anyway I guess that the goal of his project is not getting compile time errors! > There is no point in writing C in Ada, if you want to write > C, write C in C, it is less trouble :-) You dismiss the people who write elegant, portable C - maybe the huge amount of 0.05 % of the C sources that are on the Web! -- Gautier _____\\________________\_______\ http://members.xoom.com/gdemont/