comp.lang.ada
 help / color / mirror / Atom feed
From: steved@pacifier.com@199.2.117.163  (Steve Doiel)
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: <4tg4eq$qj1@news.pacifier.com> (raw)
In-Reply-To: dmarshalDv8t9y.Bq8@netcom.com


Dave Marshall writes:
>My specific question revolves around something such as this example
>that you'll find in a lot of time-handling packages.
>
>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.  Of
>course, this is because the above statement is equivalent to
>
>type some_anonymous_integer_type is new Integer;
>subtype Seconds_In_A_Day is some_anonymous_integer_type range 0 ..86400;
>
>If Integer'Last is 65535, ka-bloowie.

I certainly do not expect this behaviour.  I expect the compiler to choose a
suitably sized integer representation (perhaps a long integer) to represent the
range given.  If no such representation exists then I expect some sort of a
"not supported by this implemetation" error.

Steve Doiel





  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     ` steved [this message]
1996-07-28  0:00     ` Robert Dewar
1996-07-28  0:00     ` Robert A Duff
1996-07-28  0:00       ` Robert Dewar
1996-07-29  0:00         ` Robert A Duff
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