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,CP1252 X-Google-Thread: 103376,30e0ceaf4e6be70c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-10 08:46:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3F0D8A17.2010407@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Simple program to find average of 3 numbers References: <6ZMNa.109291$0B.2183354@wagner.videotron.net> <1ec946d1.0307090725.73f5f200@posting.google.com> <3F0C8B45.2080108@attbi.com> <1ec946d1.0307100552.3fb220ac@posting.google.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc51.ops.asp.att.net 1057851960 24.62.164.137 (Thu, 10 Jul 2003 15:46:00 GMT) NNTP-Posting-Date: Thu, 10 Jul 2003 15:46:00 GMT Organization: Comcast Online Date: Thu, 10 Jul 2003 15:46:00 GMT Xref: archiver1.google.com comp.lang.ada:40172 Date: 2003-07-10T15:46:00+00:00 List-Id: Matthew Heaney wrote: > 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? In that case T'Base has the same range as Integer'Base. > 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? Look at the output from the program I provided. In the first case, the base type has the same characteristics as Integer'Base. In the second example, look at the results of the program I ran. The compiler can choose any predefined integer type for the base type. In this case, GNAT choose one with a range -128..127. -- Robert I. Eachus �In an ally, considerations of house, clan, planet, race are insignificant beside two prime questions, which are: 1. Can he shoot? 2. Will he aim at your enemy?� -- from the Laiden novels by Sharon Lee and Steve Miller.