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.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,475c5685b75dee8a,start X-Google-Attributes: gid103376,public From: msb@sei.cmu.edu (Mark Bell) Subject: External C functions and Ada Date: 1996/08/27 Message-ID: <4vv2u4$fp8@news.sei.cmu.edu>#1/1 X-Deja-AN: 176784114 organization: Software Engineering Institute newsgroups: comp.lang.ada Date: 1996-08-27T00:00:00+00:00 List-Id: 24-Aug-96 19:03 CrsadrJoe@gnn.com (Joseph Fabian) writes : >Hi. For the last week I've been trying desperately to figure out how to >call a simple user defined C function from within an ADA program, without >the slightest bit of success I might add. I'm using the Meridian compiler, >which is an older ADA83 compliant program, because that happens to be the >compiler of choice at the school I'll be attending next semester. In a >package spec, I'm declaring the subprogram like this: Joe -- Try the following : Procedure Clrscrn; Pragma Interface(C, Clrscrn); Pragma Interface_Name(Clrscn,"_Clrscrn"); The last argument of Interface_Name is a string which denotes the name of the external subprogram as defined in the other language (in this case C). The first argument is the name by which the subprogram is known to Ada. I'll assumme that Meridian Ada supports this... Regards Mark S. Bell 412-268-7925 (Voice) Software Engineering Institute 412-268-5758 (Fax) Carnegie Mellon University ** These are my opinions, 4500 Fifth Ave, Pittsburgh PA.,15213 not those of the SEI or CMU **