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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7f9c4ba3b0dc13ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-16 06:53:28 PST Path: nntp.gmd.de!newsserver.jvnc.net!news.edu.tw!rs540.ncu.edu.tw!news.cc.nctu.edu.tw!nctuccca.edu.tw!howland.reston.ans.net!swiss.ans.net!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Addressing functions Date: 16 Dec 1994 09:53:28 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3cs9l8$mos@gnat.cs.nyu.edu> References: <3citrc$bb5@earth.usa.net> <3clisk$9th@felix.seas.gwu.edu> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1994-12-16T09:53:28-05:00 List-Id: Michael (Feldman), I think you missed the point of the question about address applied to subprograms. What the original poster wants is a way of using (i.e. CALLING) these subprograms given the address. This is of course the feature that has been added to Ada 9X. There is no guaranteed way of doing it in Ada 83, it is completely outside the standard. Nevertheless, it is often possible to set up kludges for a particular compiler. If your compiler gives the entry point of the function as the 'Address, then at least for global level functions, you can probably use some assembly glue to call them. This won't work for nested functions, because you won't be able to materialize the static link or display. On some compilers it will work to do something like: procedure p is ... x : address; x := p'address; -- or whatever .. now to call the procedure: declare procedure dummy; for dummy'address use x; pragma interface (Ada, dummy); begin dummy; end; this is not guaranteed to work, but it may work on some compilers. Best answer to original question: use Ada 95!