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,b30e93507fcd6ed9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-01 11:34:28 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!newspump.monmouth.com!newspeer.monmouth.com!newsfeeds.belnet.be!news.belnet.be!btnet-peer1!btnet-feed5!btnet!mendelevium.btinternet.com!not-for-mail From: "Singlespeeder" Newsgroups: comp.lang.ada Subject: Re: Ada'83 to Ada'95 Problem Date: Thu, 1 Mar 2001 19:29:46 -0000 Organization: BT Internet Message-ID: <97m7m4$bvo$1@plutonium.btinternet.com> References: <3A9E35F3.EE64F602@port.ac.uk> NNTP-Posting-Host: host62-7-61-137.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: supernews.google.com comp.lang.ada:5363 Date: 2001-03-01T19:29:46+00:00 List-Id: "dis00109" wrote in message news:3A9E35F3.EE64F602@port.ac.uk... > I am trying to get a program to accept two integers as input by the user > (for a university project) however in the exception handling section of > my program it will not accept a float input as an error it merely > ignores everything after the decimal point. This would appear to be a > new feature in Ada'95, can anyone think of a way to solve this...PLEASE! > If you're using the Text_IO Get procedures make sure you're using Float_IO. Be warned that on some compilers (in my experience DEC Ada 3.5-20) the string really has to represent a float or it will raise an exception. GNAT is more liberal in it's interpretation of the standard and will happily return the integer part. You have to check the value of Last to see how much of the string it converted. Nick