From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada equivalent for C-pointer?
Date: Mon, 17 Jan 2005 15:38:41 -0600
Date: 2005-01-17T15:38:41-06:00 [thread overview]
Message-ID: <7L6dnULqKptpsnHcRVn-1g@megapath.net> (raw)
In-Reply-To: u651y3bfs.fsf@obry.net
"Pascal Obry" <pascal@obry.net> wrote in message
news:u651y3bfs.fsf@obry.net...
>
> Nick Roberts <nick.roberts@acm.org> writes:
>
> > For example, if there is a C function defined thus:
> >
> > int wibble(int *n);
> >
> > then in Ada you can declare:
> >
> > function Wibble (Number: in out Interfaces.C.int);
> > pragma Import(C,Wibble,"wibble");
> >
> > and it should work. (Obviously, you must link the C functions in
somehow.)
>
> I don't think so. Here Number will be passed by value, no? And you also
need
> the returned value ;)
Go re-read B.3(63-71). In this case, specifically B.3(68). Now, that is only
"advice", but compilers are strongly encouraged to follow "advice", and I
think that they all do in this area. (Otherwise, Claw wouldn't have been
possible - we use the same pragma Imports for all of the compilers.)
Randy.
next prev parent reply other threads:[~2005-01-17 21:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-14 16:41 Ada equivalent for C-pointer? Alfred Hilscher
2005-01-14 17:00 ` Duncan Sands
2005-01-14 20:05 ` tmoran
2005-01-15 5:00 ` Brian May
2005-01-14 22:33 ` Keith Thompson
2005-01-14 23:03 ` Stephen Leake
2005-01-15 15:51 ` Nick Roberts
2005-01-15 18:54 ` tmoran
2005-01-16 1:43 ` Keith Thompson
2005-01-17 21:35 ` Randy Brukardt
2005-01-15 9:09 ` Martin Krischik
2005-01-15 16:03 ` Nick Roberts
2005-01-15 16:27 ` Pascal Obry
2005-01-15 16:50 ` Nick Roberts
2005-01-15 17:11 ` Simon Wright
2005-01-15 18:46 ` Nick Roberts
2005-01-15 17:49 ` Pascal Obry
2005-01-16 8:44 ` Martin Krischik
2005-01-16 9:58 ` Pascal Obry
2005-01-16 11:07 ` Martin Krischik
2005-01-16 8:36 ` Martin Krischik
2005-01-16 15:01 ` Niklas Holsti
2005-01-16 16:02 ` Martin Krischik
2005-01-17 15:33 ` Niklas Holsti
2005-01-16 20:39 ` Nick Roberts
2005-01-17 21:38 ` Randy Brukardt [this message]
2005-01-17 21:45 ` Pascal Obry
2005-01-17 13:11 ` Alfred Hilscher
2005-01-18 7:31 ` Keith Thompson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox