comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: How to catch NaNs with gnat3.14p
Date: 4 Feb 2002 17:06:03 -0800
Date: 2002-02-05T01:06:03+00:00	[thread overview]
Message-ID: <5ee5b646.0202041706.250d6053@posting.google.com> (raw)
In-Reply-To: 3C5E79EB.72BE43D5@earthlink.net

"Marc A. Criley" <mcqada95@earthlink.net> 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).



      reply	other threads:[~2002-02-05  1:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 13:49 How to catch NaNs with gnat3.14p Alexander Boucke
2002-02-01 14:18 ` Preben Randhol
2002-02-01 14:37   ` Alexander Boucke
2002-02-01 14:55     ` Preben Randhol
2002-02-01 14:59       ` Alexander Boucke
2002-02-01 15:30         ` Preben Randhol
2002-02-01 16:10           ` Alexander Boucke
2002-02-01 16:10             ` Jeffrey Creem
2002-02-02  6:23               ` Robert Dewar
2002-02-02  6:21     ` Robert Dewar
2002-02-04  8:57       ` Alexander Boucke
2002-02-02  6:20   ` Robert Dewar
2002-02-02 12:49     ` Preben Randhol
2002-02-02 22:56       ` Robert Dewar
2002-02-01 20:22 ` Robert Dewar
2002-02-03 13:27   ` Marc A. Criley
2002-02-03 23:06     ` Robert Dewar
2002-02-04 13:05       ` Marc A. Criley
2002-02-05  1:06         ` Robert Dewar [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox