From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: OS Bindings (was: Where is the elusive jump command?)
Date: 2000/04/12
Date: 2000-04-12T00:00:00+00:00 [thread overview]
Message-ID: <8d0su8$bqt$1@nnrp1.deja.com> (raw)
In-Reply-To: 8csjs8$o2p3@ftp.kvaerner.com
In article <8csjs8$o2p3@ftp.kvaerner.com>,
"Tarjei T. Jensen" <tarjei.jensen@kvaerner.com> wrote:
> In most cases where an unsigned type like size_t is used it is
> apropriate to translate it to an unsigned integer of some sort
> and not a modular type.
Maybe so, C unlike Ada does not have this possibility, so it
is indeed possible that the above is right. For example if
we see in C
unsigned char q;
it maybe that the best Ada translation is
type q is range 0 .. 255;
for q'size use 8;
but I still don't see the complaint, wrapping types like
unsigned in C are useful in Ada and in C, and we have always
have unsigned types in the sense of the above declaration of
q in Ada.
But I see the point you are making now. I still don't really
see why you don't like the modular types, they seem useful
and clear to me. After all Java decided it was all they needed
:-)
> Arithmetic operations which causes wraparound are most likely
> errors and should be caught.
OK, but this really has nothing to do with type checking, which
is why I was confused by your original post. But if you want
this kind of range checking, then of course do NOT use a modular
type to model the C type.
> Now I have to remember to check interface.C when I get home,
> to check verify that the definition of int, short and long in
> gnat has C semantics.
Not sure what you mean here. In C, overflow for such types
makes the program execution undefined, in Ada, the semantics
is the same as C except in this undefined case, where Ada
defines that CE must be raised.
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~2000-04-12 0:00 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-21 0:00 Where is the elusive jump command? dis90072
2000-03-21 0:00 ` Stanley R. Allen
2000-03-21 0:00 ` Nicolas Brunot
2000-03-21 0:00 ` Nicolas Brunot
2000-03-27 0:00 ` Robert A Duff
2000-03-28 0:00 ` Ken Garlington
2000-03-28 0:00 ` Robert Dewar
2000-03-28 0:00 ` Ken Garlington
2000-03-28 0:00 ` Marin D. Condic
2000-03-28 0:00 ` Robert Dewar
2000-03-29 0:00 ` Marin D. Condic
2000-03-29 0:00 ` Gary Scott
2000-03-29 0:00 ` Robert Dewar
2000-03-30 0:00 ` Gautier
2000-03-30 0:00 ` Gary Scott
2000-03-30 0:00 ` Gautier
2000-03-30 0:00 ` David Starner
2000-03-30 0:00 ` William B. Clodius
2000-03-30 0:00 ` David Starner
2000-03-30 0:00 ` Marin D. Condic
2000-03-30 0:00 ` Samuel T. Harris
2000-03-30 0:00 ` Gary Scott
2000-03-31 0:00 ` Tarjei T. Jensen
2000-03-31 0:00 ` Larry Kilgallen
2000-03-31 0:00 ` Gary Scott
2000-03-30 0:00 ` Larry Kilgallen
2000-03-30 0:00 ` Dan Nagle
2000-03-30 0:00 ` David Starner
2000-03-30 0:00 ` Samuel T. Harris
2000-03-31 0:00 ` Gisle S�lensminde
2000-03-31 0:00 ` Gisle S�lensminde
2000-03-31 0:00 ` Tarjei T. Jensen
2000-04-12 0:00 ` Robert A Duff
2000-04-12 0:00 ` Stanley R. Allen
2000-04-12 0:00 ` Samuel T. Harris
2000-04-13 0:00 ` Stanley R. Allen
2000-04-14 0:00 ` Samuel T. Harris
2000-04-14 0:00 ` BASIC->Ada, was " tmoran
2000-04-15 0:00 ` Robert Dewar
2000-04-15 0:00 ` Robert Dewar
2000-04-13 0:00 ` Tarjei T. Jensen
2000-03-31 0:00 ` Gautier
2000-03-30 0:00 ` Gary Scott
2000-03-30 0:00 ` Alfred Hilscher
2000-03-29 0:00 ` Richard D Riehle
2000-03-29 0:00 ` Robert Dewar
2000-03-30 0:00 ` Alfred Hilscher
2000-04-01 0:00 ` Robert Dewar
2000-04-04 0:00 ` Alfred Hilscher
2000-04-05 0:00 ` Ole-Hjalmar Kristensen
2000-04-05 0:00 ` Larry Kilgallen
2000-04-06 0:00 ` Ole-Hjalmar Kristensen
2000-04-06 0:00 ` OS Bindings (was: Where is the elusive jump command?) Larry Kilgallen
2000-04-06 0:00 ` Ole-Hjalmar Kristensen
2000-04-06 0:00 ` Robert Dewar
2000-04-07 0:00 ` Tarjei T. Jensen
2000-04-09 0:00 ` Robert Dewar
2000-04-10 0:00 ` Tarjei T. Jensen
2000-04-12 0:00 ` Robert Dewar [this message]
2000-04-12 0:00 ` Robert A Duff
2000-04-12 0:00 ` Tarjei T. Jensen
2000-04-12 0:00 ` Robert Dewar
2000-04-12 0:00 ` Robert Dewar
2000-04-12 0:00 ` Robert A Duff
2000-04-12 0:00 ` Robert Dewar
2000-04-12 0:00 ` Robert A Duff
2000-04-15 0:00 ` Robert Dewar
2000-04-15 0:00 ` Gisle S�lensminde
2000-04-15 0:00 ` Robert Dewar
2000-04-13 0:00 ` Tarjei T. Jensen
2000-04-13 0:00 ` Gisle S�lensminde
2000-04-12 0:00 ` Florian Weimer
2000-04-13 0:00 ` Tarjei T. Jensen
2000-04-13 0:00 ` Robert A Duff
2000-04-18 0:00 ` Tarjei T. Jensen
2000-04-15 0:00 ` Robert Dewar
2000-04-15 0:00 ` Tarjei T. Jensen
2000-04-12 0:00 ` Tarjei T. Jensen
2000-04-12 0:00 ` Robert Dewar
2000-04-13 0:00 ` Tarjei T. Jensen
2000-04-15 0:00 ` Robert Dewar
2000-04-15 0:00 ` Tarjei T. Jensen
[not found] ` <eisner comp.lang.ada:53670>
2000-04-06 0:00 ` Larry Kilgallen
2000-04-06 0:00 ` Robert Dewar
2000-04-08 0:00 ` nickerson
2000-04-09 0:00 ` Robert Dewar
2000-03-30 0:00 ` Where is the elusive jump command? Richard D Riehle
2000-04-01 0:00 ` Robert A Duff
2000-04-02 0:00 ` Robert Dewar
2000-04-02 0:00 ` Richard D Riehle
2000-04-02 0:00 ` Robert Dewar
2000-04-02 0:00 ` Robert Dewar
2000-03-28 0:00 ` Dale Stanbrough
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox