comp.lang.ada
 help / color / mirror / Atom feed
From: kst@sd.aonix.com (Keith Thompson)
Subject: Re: Simple ADA/C Question
Date: 1997/02/28
Date: 1997-02-28T00:00:00+00:00	[thread overview]
Message-ID: <E6BCJK.2LL@thomsoft.com> (raw)
In-Reply-To: dewar.856972571@merv


In <dewar.856972571@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:
[...]
> I have no idea what BOb is thinking of here. It is perfectly fine to
> call a C function that returns an int, with the Ada function having
> a return type of (type Myint is new Integer), if the representation of
> int and Integer are the same, as is always true of GNAT, and likely
> true of most other Ada 95 compilers.

If you have a C function that returns an int, the corresponding Ada
function's return type should be Interfaces.C.int.  Yes, C's int and Ada's
Integer are usually the same size, but why take chances when the language
provides a type that's *guaranteed* to have the same representation?

-- 
Keith Thompson (The_Other_Keith) kst@sd.aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
"Humor is such a subjective thing." -- Cartagia




  reply	other threads:[~1997-02-28  0:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-25  0:00 Simple ADA/C Question root
1997-02-26  0:00 ` Bob Klungle
1997-02-26  0:00   ` root
1997-02-26  0:00     ` Robert Dewar
1997-02-28  0:00       ` Keith Thompson [this message]
1997-03-02  0:00         ` Robert Dewar
1997-03-04  0:00           ` Keith Thompson
1997-03-04  0:00             ` Robert Dewar
1997-03-04  0:00               ` John McCabe
1997-03-04  0:00                 ` Robert Dewar
1997-03-06  0:00                   ` Keith Thompson
1997-03-06  0:00                     ` Larry Kilgallen
1997-03-09  0:00                       ` Robert Dewar
1997-03-06  0:00                     ` Robert Dewar
1997-03-04  0:00                 ` Anders Eliasson
1997-02-26  0:00     ` Stephen Leake
1997-02-26  0:00       ` root
1997-02-26  0:00     ` John McCabe
1997-02-27  0:00 ` Robert Dewar
1997-02-27  0:00   ` root
1997-02-27  0:00   ` root
1997-03-03  0:00 ` Robert I. Eachus
1997-03-05  0:00   ` Robert Dewar
1997-03-05  0:00 ` Jon S Anthony
1997-03-06  0:00   ` Robert Dewar
1997-03-07  0:00 ` Jon S Anthony
1997-03-07  0:00   ` Robert Dewar
1997-03-08  0:00     ` Larry Kilgallen
1997-03-07  0:00   ` Robert Dewar
replies disabled

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