From: Tarek Ghaleb <invalid@invalid.org>
Subject: System.Address to Access to function/procedure conversion
Date: Sun, 28 Jul 2013 15:27:48 +0000 (UTC)
Date: 2013-07-28T15:27:48+00:00 [thread overview]
Message-ID: <kt3d9j$vmp$1@adenine.netfront.net> (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 ---
next reply other threads:[~2013-07-28 15:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-28 15:27 Tarek Ghaleb [this message]
2013-07-28 16:14 ` System.Address to Access to function/procedure conversion 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox