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-Thread: 103376,5c3042563529d4f3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.189.202 with SMTP id gk10mr1955237pbc.4.1326490305229; Fri, 13 Jan 2012 13:31:45 -0800 (PST) Path: lh20ni178755pbb.0!nntp.google.com!news1.google.com!postnews.google.com!r5g2000yqc.googlegroups.com!not-for-mail From: John McCormick Newsgroups: comp.lang.ada Subject: Re: Data_Error and Enumeration_IO Date: Fri, 13 Jan 2012 13:30:24 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <3f3d626a-1b8c-49af-aa85-9e586029a817@z12g2000yqm.googlegroups.com> NNTP-Posting-Host: 134.161.242.221 Mime-Version: 1.0 X-Trace: posting.google.com 1326490305 9190 127.0.0.1 (13 Jan 2012 21:31:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 13 Jan 2012 21:31:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r5g2000yqc.googlegroups.com; posting-host=134.161.242.221; posting-account=jVm7MAoAAABZ69ylB7L9PjZAVQg4j4fC User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-01-13T13:30:24-08:00 List-Id: On Jan 12, 6:10=A0pm, "Randy Brukardt" wrote: > > Jeff and Georg already explained what is going on. But I have to admit I'= m > surprised that you aren't aware of this, since it has been a problem with > Ada.Text_IO since the beginning of time (1980 in Ada's case). Never be surprised about another's ignorance. I wasn't in the Ada world during the discussions in the 1980s. The only thing in Jeff's and Georg's notes of which I had not known was the reference to the material on Data_Error and real types. From that it seems that the parsing of a potential floating point number uses knowledge of previously entered characters. For example, if you enter "1.2E." it recognizes that the second decimal point is an error. Yet when you enter "abc" in my original example for enumeration IO, it cannot recognize that no valid enumeration literal starts with an a. It has to process the entire identifier before it can see that. So the crux of my question is why doesn't the consumption of characters for enumeration input behave like that of real input. It doesn't really matter other than to satisfy my curiosity.