From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada array vs C pointer (call by reference)
Date: Tue, 1 Jul 2008 16:10:52 -0500
Date: 2008-07-01T16:10:52-05:00 [thread overview]
Message-ID: <g4e6h5$40d$1@jacob-sparre.dk> (raw)
In-Reply-To: lzzlp6amdv.fsf@stalkings.ghoti.net
"Keith Thompson" <kst-u@mib.org> wrote in message
news:lzzlp6amdv.fsf@stalkings.ghoti.net...
> Maciej Sobczak <see.my.homepage@gmail.com> writes:
...
>> Is there any implementation where Interfaces.C.int has different
>> properties than Integer?
>
> I don't know, and I suggest that you don't know either.
I do! I do! ;-)
On Janus/Ada, Integer is always 16-bit (for compatibility with our original
implementations), but Interfaces.C.Int is whatever the C compiler uses (for
most targets, including Windows, that's 32-bit).
If you use Interfaces.C and pragma Convention as intended, your interfacing
code ought to be portable - at least with the supported C compiler(s) (and
you have a bug to report if it is not). If you use Integer or Float, you're
adding portability issues where none are needed.
Indeed, IMHO any code explicitly using the predefined types is wrong in Ada
(vis-a-vis portability). And yes, I include the various items in the
standard language that do that (including the random number generator and of
course type String). It's one of the worst flaws in the language (since it
makes string usage not portable, which is idiotic).
Randy.
next prev parent reply other threads:[~2008-07-01 21:10 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 1:39 Ada array vs C pointer (call by reference) Adrian Hoe
2008-06-27 1:42 ` Adrian Hoe
2008-06-27 2:55 ` Adam Beneschan
2008-06-27 13:02 ` Maciej Sobczak
2008-06-27 13:15 ` Adrian Hoe
2008-06-27 14:43 ` Georg Bauhaus
2008-06-27 14:47 ` Georg Bauhaus
2008-06-27 20:35 ` Maciej Sobczak
2008-06-27 22:00 ` Georg Bauhaus
2008-06-27 22:46 ` Keith Thompson
2008-06-27 16:11 ` Keith Thompson
2008-06-27 17:00 ` Robert A Duff
2008-06-27 18:15 ` Keith Thompson
2008-06-28 14:02 ` Stephen Leake
2008-06-28 21:18 ` Keith Thompson
2008-07-03 12:44 ` Rob Norris
2008-06-27 20:44 ` Maciej Sobczak
2008-06-27 22:14 ` Keith Thompson
2008-06-27 22:36 ` Adam Beneschan
2008-06-28 14:04 ` Stephen Leake
2008-06-28 21:22 ` Keith Thompson
2008-06-30 17:13 ` Adam Beneschan
2008-06-28 17:52 ` Robert A Duff
2008-06-30 17:13 ` Adam Beneschan
2008-06-30 18:55 ` Robert A Duff
2008-07-01 21:19 ` Randy Brukardt
2008-07-01 21:19 ` Randy Brukardt
2008-06-28 0:56 ` Peter C. Chapin
2008-06-28 14:11 ` Maciej Sobczak
2008-06-28 17:49 ` tmoran
2008-06-28 21:46 ` Keith Thompson
2008-06-28 17:44 ` Robert A Duff
2008-07-01 21:10 ` Randy Brukardt [this message]
2008-06-27 18:13 ` tmoran
2008-06-27 20:49 ` Maciej Sobczak
2008-06-27 4:10 ` Jeffrey R. Carter
2008-06-27 8:22 ` Adrian Hoe
2008-06-27 15:07 ` Adam Beneschan
2008-06-27 22:54 ` Jeffrey R. Carter
2008-06-28 1:15 ` Adrian Hoe
2008-06-28 2:17 ` Adam Beneschan
2008-07-01 21:31 ` Randy Brukardt
2008-07-01 21:31 ` Randy Brukardt
2008-08-22 4:06 ` Adrian Hoe
2008-06-28 4:59 ` Jeffrey R. Carter
2008-06-29 3:48 ` anon
2008-06-28 1:21 ` anon
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox