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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88e7ef9008757431 X-Google-Attributes: gid103376,public From: dkristol@see-my.sig (David Kristola) Subject: Re: Function Calls by Address Date: 1999/08/31 Message-ID: <7qfd5f$pn02@svlss.lmms.lmco.com>#1/1 X-Deja-AN: 519129042 Distribution: world References: <37CADE68.6AF06F5D@escmail.orl.lmco.com> Organization: heaps of stacks Reply-To: dkristol@see-my.sig Newsgroups: comp.lang.ada Date: 1999-08-31T00:00:00+00:00 List-Id: In article 6AF06F5D@escmail.orl.lmco.com, Craig Jameson () writes: >Does any one know how to make dynamic function calls in Ada83. >I am writing an application using AIX Motif bindings and I >need to create a dynamic list of functions to be called when >a particular X event is dispatched. Any ideas on how to >create and use such a list? Many years ago, when i was involved with an Ada83 tool that had an X Windows interface, we used C wrappers to call the Ada routines, and passed pointers to the C wrappers to the callback engine. More recently, in an embedded system, we used machine code to branch to a supplied address, and used 'ADDRESS of the parameterless procedures to set up the callback routines. This worked in our particular environment (exceptions even propagated correctly through the indirect subroutine call), but we had to insure this on our own, since we were going well outside the definition of the language. --djk, keeper of arcane lore & trivial fluff Home: David95037 at aol dot com Spam: goto.hades@welovespam.com