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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f349615dc134784c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-21 08:00:13 PST Path: newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!titan03.ksc.nasa.gov!niven.ksc.nasa.gov!usenet From: "Samuel T. Harris" Newsgroups: comp.lang.ada Subject: Re: Positive Floating Range? Date: Sat, 21 Apr 2001 09:57:21 -0500 Organization: Raytheon Aerospace Engineering Services Message-ID: <3AE19FD1.D27BC646@gsde.hou.us.ray.com> References: <817E6.2056$DW1.94361@iad-read.news.verio.net> Reply-To: samuel_t_harris@raytheon.com NNTP-Posting-Host: sstf-fw.jsc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.7 [en] (X11; U; IRIX64 6.2 IP19) X-Accept-Language: en Xref: newsfeed.google.com comp.lang.ada:6829 Date: 2001-04-21T09:57:21-05:00 List-Id: Dr Nancy's Sweetie wrote: > > So it looks like I get what I want with: > > subtype Foo is Float range Float'Succ(0.0)..Float'Last; > > When I tried that, and typed in "0.0" for a "Get(fooVar);", it > didn't give a constraint error. So there's apparently something > I can't see going on here. Try entering just "0". I believe Ada 95 requires the simple integer to be appropriate for input to real types. If I remember correctly ... Ada requires that the conversion of an integer type to a float zero out all the decimal digits. A conversion of a short_float to a long_float does NOT require zeroing out the extra digits. Hopefully, by entering a 0, an internal conversion will occur and assure that you get a 0.0 and all zero digits. -- Samuel T. Harris, Principal Engineer Raytheon, Aerospace Engineering Services "If you can make it, We can fake it!"