TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version: 1.0
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: "S. Ron Oliver" <[log in to unmask]>
Date: Tue, 20 Feb 2001 17:39:36 -0700
In-Reply-To: <[log in to unmask] cs.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed
Reply-To: "S. Ron Oliver" <[log in to unmask]>
Parts/Attachments: text/plain (30 lines)
At 03:34 PM 2/20/01 -0800, Doran, Steven wrote:

>Does anyone know how to call an Ada 95 function by address (if possible)?

Yes.  Declare an access-to-procedure variable, assign it to the function,
then dereference it with something like "name.all", to the right of the
assignment operator, etc.

I must admit I forget the particular syntax just now (never try to remember
such things) since I haven't done it for some time, but I have done just
that in some of the sample programs in my Ada95 Test Suite.

If you have trouble getting it and no one else remembers better than I do,
I can go back and look for that code.

sro




S. Ron Oliver, semi-retired professor of Computer Science and Computer
Engineering.  www.csc.calpoly.edu/~sroliver

caress Corporation is proud to be the U.S. representative for Top Graph'X,
developers of high quality software components, using Ada.  For more
information, check out www.topgraphx.com.

Tired of sucky software! ?  Check out www.caressCorp.com and follow the
links to software sucks and The Oliver Academy.

ATOM RSS1 RSS2