comp.lang.ada
 help / color / mirror / Atom feed
From: fjh@cs.mu.oz.au (Fergus Henderson)
Subject: Re: Compiling, binding, and linking an Ada prog. interfaced with C
Date: 1998/07/29
Date: 1998-07-29T00:00:00+00:00	[thread overview]
Message-ID: <6pn02g$2ue$1@mulga.cs.mu.OZ.AU> (raw)
In-Reply-To: 35BD28BF.A5B@atlas.otago.ac.nz

"Dr Richard A. O'Keefe" <ok@atlas.otago.ac.nz> writes:

>You4818 wrote:
>> I am trying to interface an Ada program to C, such that the main
>> program is in Ada and some entities are being imported from a
>> C header file (e.g. constant variables).
>> 
>> For example, consider the following
>> 
>> C_File.h  :  #define  Max_Val 100
>
>I see no constant variable here.  All I see is a macro.

This is true.  It's a constant value, implemented using a macro,
rather than a constant variable.  The original poster's terminology
was not quite right.  Nevertheless, it is still an "entity",
and it is still something which it makes sense to import into
another language.

This is one respect in which Ada's otherwise excellent C interface
features are not quite as good as those of Mercury or ISE Eiffel,
which both allow you to import C macros without having to write a
separate C file containing glue code.

--
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.




  reply	other threads:[~1998-07-29  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-27  0:00 Re:Compiling, binding, and linking an Ada prog. interfaced with C You4818
1998-07-28  0:00 ` Compiling, " Dr Richard A. O'Keefe
1998-07-29  0:00   ` Fergus Henderson [this message]
1998-07-30  0:00     ` Robert I. Eachus
1998-08-01  0:00       ` Robert Dewar
1998-08-02  0:00         ` Fergus Henderson
1998-08-04  0:00           ` Robert Dewar
1998-08-04  0:00             ` Fergus Henderson
1998-08-03  0:00         ` David Coote
1998-08-03  0:00           ` tedennison
1998-08-02  0:00       ` Fergus Henderson
     [not found] ` <6pi57h$k1h$1@nnrp1.dejanews.com>
1998-07-28  0:00   ` Ronald Ali
replies disabled

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