From: mheaney@on2.com (Matthew Heaney)
Subject: Re: Simple program to find average of 3 numbers
Date: 10 Jul 2003 06:52:40 -0700
Date: 2003-07-10T13:52:40+00:00 [thread overview]
Message-ID: <1ec946d1.0307100552.3fb220ac@posting.google.com> (raw)
In-Reply-To: 3F0C8B45.2080108@attbi.com
"Robert I. Eachus" <rieachus@attbi.com> wrote in message news:<3F0C8B45.2080108@attbi.com>...
> Matthew Heaney wrote:
>
> > The type declaration in your example looks like this:
> >
> > type T is new Integer range 1 .. 100;
> >
> > However, I'm not sure whether it corresponds to the declarations
> >
> > type T_Base is new Integer; subtype T is T_Base range 1 .. 100;
> >
> > or to the declarations:
> >
> > type T_Base is range -100 .. 100; subtype T is T_Base range 1 .. 100;
> >
> >
> > It executes fine when I run it, so it seems to correspond to the
> > former pair.
>
> It corresponds to:
>
> subtype T is <implementation defined integer type> range 1..100;
>
> except that one thing we learned from Ada 83 is that such "helpful"
> analogies are always wrong. ;-) Which is why you won't find any in the
> Ada 95 RM.
But the question is: what is the base range of the "implementation
defined integer type"? For declarations of this style:
type T is new Integer range 1 .. 100;
can was assume that the base range of the type includes all the values
in Integer'Base, or only the values in the range -100 .. 100?
With respect to the base range of the type, how do the declarations
type T is new Integer range 1 .. 100;
type T is range 1 .. 100;
differ from one another?
next prev parent reply other threads:[~2003-07-10 13:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-04 5:01 Simple program to find average of 3 numbers prashna
2003-07-04 5:22 ` John R. Strohm
2003-07-04 5:34 ` Cephus�
2003-07-04 9:54 ` Tarjei T. Jensen
2003-07-05 17:49 ` Cephus�
2003-07-04 5:33 ` Robert I. Eachus
2003-07-04 8:37 ` Stuart Palin
2003-07-05 10:06 ` Preben Randhol
2003-07-04 5:39 ` tmoran
2003-07-04 9:28 ` prashna
2003-07-04 11:02 ` Stuart Palin
2003-07-04 16:20 ` Pascal Obry
2003-07-05 1:25 ` Robert I. Eachus
[not found] ` <1e3ht-ig4.ln1@beastie.ix.netcom.com>
2003-07-04 21:17 ` Jeffrey Creem
2003-07-05 5:07 ` Anders Wirzenius
2003-07-05 14:39 ` Marqmc5
2003-07-06 3:47 ` g_ak
2003-07-08 5:06 ` prashna
2003-07-09 15:25 ` Matthew Heaney
2003-07-09 21:38 ` Robert I. Eachus
2003-07-10 13:52 ` Matthew Heaney [this message]
2003-07-10 15:46 ` Robert I. Eachus
2003-07-11 0:56 ` Randy Brukardt
2003-07-11 21:54 ` Robert A Duff
2003-07-11 21:50 ` Robert A Duff
2003-07-11 23:32 ` Robert I. Eachus
2003-07-10 4:55 ` Simon Wright
-- strict thread matches above, loose matches on Subject: below --
2003-07-09 6:24 christoph.grein
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox