From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,30e0ceaf4e6be70c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-10 06:52:41 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Simple program to find average of 3 numbers Date: 10 Jul 2003 06:52:40 -0700 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0307100552.3fb220ac@posting.google.com> References: <6ZMNa.109291$0B.2183354@wagner.videotron.net> <1ec946d1.0307090725.73f5f200@posting.google.com> <3F0C8B45.2080108@attbi.com> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1057845160 6214 127.0.0.1 (10 Jul 2003 13:52:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 10 Jul 2003 13:52:40 GMT Xref: archiver1.google.com comp.lang.ada:40166 Date: 2003-07-10T13:52:40+00:00 List-Id: "Robert I. Eachus" 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 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?