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,f4e7d286a074ed9 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: Help with ADA and C function pointers. Date: 1996/11/22 Message-ID: <3295AE0E.1AC5@gsfc.nasa.gov>#1/1 X-Deja-AN: 198067710 references: <32937F73.65A8@rsa.hisd.harris.com> content-type: text/plain; charset=us-ascii organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA mime-version: 1.0 reply-to: Stephen.Leake@gsfc.nasa.gov newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (Win95; U) Date: 1996-11-22T00:00:00+00:00 List-Id: Wendell P Beckwith wrote: > > [snip] > > -- my test main > with Text_IO, Interfaces.C; > use Text_IO; > > Procedure Gmain is > > Function func(d : in Integer) return Integer is > Begin > return (2 * d); > End; > type func_type is access Function(d : in Integer) return Integer; > funcptr : func_type; > > Procedure Stuff(f : in func_type); > pragma Import(C, Stuff, "stuff"); > > Begin > Stuff(funcptr); > End; > Try: Stuff (Func'access); You don't actually need the funcptr variable. > Please respond to my work email, since I'm > not in this group alot. Thanks!! > Sorry, you'll have to read thru the news just like the rest of us; we hope you'll be able to contribute something! -- - Stephe