comp.lang.ada
 help / color / mirror / Atom feed
From: John McCormick <mccormick@cs.uni.edu>
Subject: Re: Data_Error and Enumeration_IO
Date: Fri, 13 Jan 2012 13:30:24 -0800 (PST)
Date: 2012-01-13T13:30:24-08:00	[thread overview]
Message-ID: <c098273e-b8ff-4eca-9096-717f4e416960@r5g2000yqc.googlegroups.com> (raw)
In-Reply-To: jensq1$45b$1@munin.nbi.dk

On Jan 12, 6:10 pm, "Randy Brukardt" <ra...@rrsoftware.com> 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.




  parent reply	other threads:[~2012-01-13 21:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 22:41 Data_Error and Enumeration_IO John McCormick
2012-01-12 23:02 ` Jeffrey Carter
2012-01-12 23:28 ` Georg Bauhaus
2012-01-13  0:10 ` Randy Brukardt
2012-01-13  8:33   ` Dmitry A. Kazakov
2012-01-13 21:30   ` John McCormick [this message]
2012-01-13 22:00     ` Jeffrey Carter
2012-01-14  0:09       ` Randy Brukardt
2012-01-14  9:51         ` Dmitry A. Kazakov
2012-01-14 12:25         ` Niklas Holsti
replies disabled

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