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,8309f2bc055237c4 X-Google-Attributes: gid103376,public From: Dale Stanbrough Subject: Re: Bit manipulation Date: 2000/11/08 Message-ID: #1/1 X-Deja-AN: 691341515 References: <8u8v6n$b7o$1@nnrp1.deja.com> <2WTH$pdrCfOd@eisner.decus.org> <8ub6kt$6nd$1@nnrp1.deja.com> <8ubeq8$cgm$1@nnrp1.deja.com> <8ubld2$hdd$1@nnrp1.deja.com> X-Complaints-To: news@bigpond.net.au X-Trace: news-server.bigpond.net.au 973716187 144.132.95.65 (Thu, 09 Nov 2000 07:43:07 EST) Organization: RMIT User-Agent: MT-NewsWatcher/3.0 (PPC) NNTP-Posting-Date: Thu, 09 Nov 2000 07:43:07 EST Newsgroups: comp.lang.ada Date: 2000-11-08T00:00:00+00:00 List-Id: Sandro Binetti wrote: > My ADA code has, always, a little (very little) part made of "pragma > INTERFACES" to C language, in order to manage certain Unix or Linux > kernel capabilities (curses, for example). > > So, once again, the question is the following: > > IF I HAVE TO MANAGE A COMPLEX UNCOMMERCIAL DEVICE, SAY A SATELLITE BUS, > WHY DO I HAVE TO WRITE ALL THE CODE USING ADA (IMPOSED FOR THESE REAL- > TIME ORIENTED APPLICATIONS) AND, AT A CERTAIN MOMENT, USE LOW LEVEL > MANIPULATION IN C LANGUAGE? You use one argument ("i have to use Unix or Linux kernel capabilties") to bring us to a second argument ("i have to do low level manipulation in C"). The answer to the first argument is that you use C to call Unix routines because either the ABI is a C like one e.g. execv does not have to be written in C, but the calling notations use the C language to describe it. Most of the time it is also written in C, but this may not always be the case. (is the entire POSIX compatability library for VMS written in C?). the routine you are calling is in C. You call the routines because they are there, and it's cheaper than rewriting them. Nothing wrong with that. The second argument, that you -have- to use low level manipulation in C, is not supported by any examples. I'm struggling to think up an example for which this is the case. Could you provide an example? Dale