From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Prevalence of Compilers for Which Integer'Size < 32?
Date: 1996/07/28
Date: 1996-07-28T00:00:00+00:00 [thread overview]
Message-ID: <Dv9JAE.D23@world.std.com> (raw)
In-Reply-To: dmarshalDv8t9y.Bq8@netcom.com
In article <dmarshalDv8t9y.Bq8@netcom.com>,
Dave Marshall <dmarshal@netcom.com> wrote:
>type Seconds_In_A_Day is range 0 .. 86_400;
>
>This is going to work fine for compilers for which Integer'Size is 32,
>but it will fail for compilers for which Integer'Size = 16.
No, that's not quite right. The largest integer range supported has
nothing to do with the range of Integer. A compiler could have:
type Integer is range -2**15..2**15-1;
and still support:
type Seconds_In_A_Day is range 0 .. 60*60*24;
(Why does everybody in this thread like literals so much?)
or:
type Huge_Positive is range 1..10**100; -- unlikely, I admit
So the *real* question you want to ask is, "Do all compilers support at
least 32-bit integers?" Well, I don't know for sure, but I certainly
assume that in the code I write. I simply wouldn't buy a compiler that
didn't (even for a 16-bit machine).
I believe that all versions of GNAT support 64-bit integers.
- Bob
next prev parent reply other threads:[~1996-07-28 0:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-26 0:00 Prevalence of Compilers for Which Integer'Size < 32? Dave Marshall
1996-07-27 0:00 ` steved
1996-07-28 0:00 ` Dave Marshall
1996-07-28 0:00 ` Robert A Duff [this message]
1996-07-28 0:00 ` Robert Dewar
1996-07-29 0:00 ` Robert A Duff
1996-07-28 0:00 ` Robert Dewar
1996-07-28 0:00 ` steved
1996-07-28 0:00 ` Robert A Duff
1996-07-30 0:00 ` Ken Garlington
1996-07-30 0:00 ` Robert Dewar
1996-08-01 0:00 ` steved
[not found] ` <31FF5CF0.5C13@lmtas.lmco.com>
1996-08-03 0:00 ` Robert Dewar
1996-08-07 0:00 ` Ken Garlington
-- strict thread matches above, loose matches on Subject: below --
1996-07-28 0:00 tmoran
1996-07-29 0:00 ` John Herro
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox