comp.lang.ada
 help / color / mirror / Atom feed
From: "Des Walker" <des.walker@dessy.fsnet.co.uk>
Subject: Re: pointer in C & in  Ada
Date: Thu, 9 Aug 2001 00:29:53 +0100
Date: 2001-08-08T23:46:04+00:00	[thread overview]
Message-ID: <9ksivs$1rs$1@news6.svr.pol.co.uk> (raw)
In-Reply-To: otcc7.2752$NJ6.10767@www.newsranger.com


Ted Dennison <dennison@telepath.com> 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






  parent reply	other threads:[~2001-08-08 23:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-07 22:39 pointer in C & in Ada Lin
2001-08-07 23:05 ` Didier Utheza
2001-08-08  9:29   ` Florian Weimer
2001-08-08 14:52     ` Ted Dennison
2001-08-08 16:52       ` Florian Weimer
2001-08-09 16:54     ` Didier Utheza
2001-08-13 15:47       ` lange92
2001-08-07 23:31 ` tmoran
2001-08-08  3:14 ` DuckE
2001-08-08  9:32 ` Des Walker
2001-08-08 10:40   ` Florian Weimer
2001-08-08 18:03   ` tmoran
2001-08-08 14:59 ` Ted Dennison
2001-08-08 16:53   ` Florian Weimer
2001-08-08 18:03   ` tmoran
2001-08-08 23:29   ` Des Walker [this message]
2001-08-09 20:21     ` Florian Weimer
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox