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,57d25404e12d2837 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-04 17:06:03 PST Path: archiver1.google.com!news1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: How to catch NaNs with gnat3.14p Date: 4 Feb 2002 17:06:03 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0202041706.250d6053@posting.google.com> References: <5ee5b646.0202011222.e4cd3cf@posting.google.com> <3C5D2D77.288208B0@earthlink.net> <5ee5b646.0202031506.3b21fba2@posting.google.com> <3C5E79EB.72BE43D5@earthlink.net> NNTP-Posting-Host: 205.232.38.244 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1012871163 10950 127.0.0.1 (5 Feb 2002 01:06:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 5 Feb 2002 01:06:03 GMT Xref: archiver1.google.com comp.lang.ada:19612 Date: 2002-02-05T01:06:03+00:00 List-Id: "Marc A. Criley" wrote in message news:<3C5E79EB.72BE43D5@earthlink.net>... > From an Ada practitioners point-of-view, however, the > fact that the predefined Integer is constrained, the > predefined Float is unconstrained, and 'Last works on > both seems odd. But as I noted, the predefined type Integer'Base is also unconstrained. So Float'Base and Integer'Base behave exactly the same. The decision to make Integer constrained and Float unconstrained is a pragmatic one that recognizes that most people are perfectly happy to have extra float range and a lot of hardware can only be used efficiently if float is allowed to have extra range. Once again, for base types, the base range is the minimum range, guaranteed, but it is not a constraint. > > I encountered this when working on my > ASIS_Expression_Resolver package a > couple years ago. The ASIS definition is flawed here, I suspect that those writing it did not understand the new Ada 95 treatment of base types as unconstrained (the ASIS definition was derived directly from Ada 83, so it does not always properly handle Ada 95 features like this).