comp.lang.ada
 help / color / mirror / Atom feed
* System.Address to Access to function/procedure conversion
@ 2013-07-28 15:27 Tarek Ghaleb
  2013-07-28 16:14 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Tarek Ghaleb @ 2013-07-28 15:27 UTC (permalink / raw)


Hi Everyone,

This is my first post to comp.lang.ada and it is so embarrassingly
trivial. Given an Address of a function/procedure, how can you call it
or convert the address to an access?

I first thought of System.Address_To_Access_Conversions, but then it
doesn't seem to work for a function/procedure.

The way I finally did it was to wrap an access to the function in a
record and then pass the Address of the record, but there must be a
simpler way.

As for why not just pass an Access to the function directly, the
Address is actually passed to a C function which later passes it back
to Ada.

Tarek.

-- 
For fools rush in where angels fear to tread. -- Alexander Pope

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-07-29  7:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-28 15:27 System.Address to Access to function/procedure conversion Tarek Ghaleb
2013-07-28 16:14 ` Dmitry A. Kazakov
2013-07-28 19:05   ` Tarek Ghaleb
2013-07-28 19:23     ` Simon Wright
2013-07-28 22:03       ` Tarek Ghaleb
2013-07-28 20:03     ` Dmitry A. Kazakov
2013-07-28 21:13     ` Shark8
2013-07-28 22:54       ` Tarek Ghaleb
2013-07-29  3:27         ` Shark8
2013-07-29  7:06           ` Tarek Ghaleb
2013-07-28 17:19 ` Jeffrey Carter
2013-07-28 19:05   ` Tarek Ghaleb
2013-07-28 20:04     ` Jeffrey Carter
2013-07-28 21:31 ` Maciej Sobczak
2013-07-29  6:26   ` Tarek Ghaleb

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