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,3ce5636289df1f84 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-08 16:46:20 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.158.233.21!news1.ebone.net!news.ebone.net!diablo.theplanet.net!news.theplanet.net!not-for-mail From: "Des Walker" Newsgroups: comp.lang.ada Subject: Re: pointer in C & in Ada Date: Thu, 9 Aug 2001 00:29:53 +0100 Message-ID: <9ksivs$1rs$1@news6.svr.pol.co.uk> References: <86772402.0108071439.1c3e1e40@posting.google.com> NNTP-Posting-Host: modem-108.clown-tang.dialup.pol.co.uk X-Trace: news6.svr.pol.co.uk 997314364 1916 62.136.249.108 (8 Aug 2001 23:46:04 GMT) NNTP-Posting-Date: 8 Aug 2001 23:46:04 GMT X-Complaints-To: abuse@theplanet.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Xref: archiver1.google.com comp.lang.ada:11652 Date: 2001-08-08T23:46:04+00:00 List-Id: Ted Dennison wrote in message news:otcc7.2752$NJ6.10767@www.newsranger.com... > In article <86772402.0108071439.1c3e1e40@posting.google.com>, Lin says... > > > >If "int *p" declares that pointer p points to integer type, then > >what's the meaning of "void *p"? How can I represent it(void *p) in > >Ada language? > > > I generally use System.Address (or a private type derived from it). There was a > long discussion about this a few years back. What I remember was that this is > not guaranteed to be portable (to work on every platform), but no-one could > think of an existing platform on which it doesn't work. If an access to > Interfaces.C.Char seems more portable, use that. > > --- > T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html > home email - mailto:dennison@telepath.com Hi, I didn't read the aforementioned thread, so apologies if this is old information. Just for interest on interfacing to C functions, I note that the C-FAQ mentions some platforms that use different addressing mechanisms depending on the type of object being addressed, in a discussion about the null pointer in C. http://www.eskimo.com/~scs/C-faq/q5.17.html There probably isn't an Ada port for most of these platforms, although the 8086 family gets a mention, as some may use 16 bit data pointers and 32 bit function pointers. Regards Des Walker