TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
"S. Ron Oliver" <[log in to unmask]>
Reply To:
S. Ron Oliver
Date:
Tue, 20 Feb 2001 17:39:36 -0700
Content-Type:
text/plain
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