TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML 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:
Tom Moran <[log in to unmask]>
Reply To:
Tom Moran <[log in to unmask]>
Date:
Tue, 20 Feb 2001 16:37:09 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (13 lines)
> Does anyone know how to call an Ada 95 function by address
> (if possible)? I
> know you can
> in C/C++.
    type Trig_Spec is access function(Theta : Radians) return Float;
    pragma Convention(StdCall, Trig_Spec); -- StdCall or whatever
    A_Function : Trig_Spec;
    ...
    A_Function := -- get a pointer from C program, "access
xyz",                                       --
System.Address_To_Access_Conversions, or whatever
    Y := A_Function(X);

ATOM RSS1 RSS2