comp.lang.ada
 help / color / mirror / Atom feed
From: msb@sei.cmu.edu (Mark Bell)
Subject: External C functions and Ada
Date: 1996/08/27
Date: 1996-08-27T00:00:00+00:00	[thread overview]
Message-ID: <4vv2u4$fp8@news.sei.cmu.edu> (raw)


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 **




             reply	other threads:[~1996-08-27  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-27  0:00 Mark Bell [this message]
1996-08-28  0:00 ` External C functions and Ada Arthur Evans Jr
  -- strict thread matches above, loose matches on Subject: below --
1996-08-24  0:00 External C functions and ADA Joseph Fabian
1996-08-26  0:00 ` Jim Dorman
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox