TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To:
Simon Wright <[log in to unmask]>
Date:
Sun, 15 Aug 1999 20:41:14 -0500
Reply-To:
Randy Brukardt <[log in to unmask]>
Subject:
From:
Randy Brukardt <[log in to unmask]>
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset="iso-8859-1"
MIME-Version:
1.0
Parts/Attachments:
text/plain (18 lines)
> > Why is it that user-defined exceptions are treated in a different manner
> > from the pre-defined ones?  What happens to the <LT> character (which I
> > assume to be remaining in the buffer and causing the loop) in the
> > Range_Error situation?
>
> Try entering eg 1 0 1 x x x RET:

Ada.Text_IO.Get is defined to read only legal characters; if it raises an
exception it reads NOTHING. Therefore, the illegal characters remain in the
input stream; if you do the same read again, you'll get the same error
(because the same characters are still there).

This behavior was defined in Ada 83, and Ada 95 left it alone for
compatibility purposes. This is the number one not-a-bug bug report that we
get here at RRS, and I wish it had been defined more intuitively...

                        Randy.

ATOM RSS1 RSS2