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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!zen.net.uk!dedekind.zen.co.uk!news.netfront.net!not-for-mail From: Tarek Ghaleb Newsgroups: comp.lang.ada Subject: System.Address to Access to function/procedure conversion Date: Sun, 28 Jul 2013 15:27:48 +0000 (UTC) Organization: Netfront http://www.netfront.net/ Message-ID: NNTP-Posting-Host: 5.34.241.111 X-Trace: adenine.netfront.net 1375025268 32473 5.34.241.111 (28 Jul 2013 15:27:48 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Sun, 28 Jul 2013 15:27:48 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: number.nntp.dca.giganews.com comp.lang.ada:182736 Date: 2013-07-28T15:27:48+00:00 List-Id: 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 ---