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.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: System.Address to Access to function/procedure conversion Date: Sun, 28 Jul 2013 20:23:15 +0100 Organization: A noiseless patient Spider Message-ID: References: <15i0rfwzpj7cy$.ob5l4ffr5iqa$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="d88aa8a0fafe4f7fb3eb325f8f3d97d0"; logging-data="24180"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GSRX2wETqGj5kQm+WsbZZXg/QzyHupDA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:xns8s4Vhcg08s9AIaUc6GC3SJ/M= sha1:CVLbMiqfwR/nV2o+A788mAxDLdI= X-Original-Bytes: 1841 Xref: number.nntp.dca.giganews.com comp.lang.ada:182742 Date: 2013-07-28T20:23:15+01:00 List-Id: Tarek Ghaleb writes: > Ideally, Callback() is not the actual imported callback() but it takes > Ada friendly parameters and does any type conversions needed then > calls the imported callback() function. I find this confusing because I'm used to thinking of the procedure-to- be-called-back as the 'callback', and what you're talking about here is the registration interface. But if that's FLTK's nomenclature ... Especially if the called-back procedure takes parameters, you're going to have to do a conversion on the way back as well! I think you might be able to do something with a generic, but .. you can't make a generic formal type definition that declares an "access to procedure with this parameter profile" type.