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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88b13dd2d29fb385 X-Google-Attributes: gid103376,public From: "John G. Volan" Subject: Re: Help With Ada_Io and Exceptions Date: 1997/05/30 Message-ID: <338F083A.4D2A@sprintmail.com>#1/1 X-Deja-AN: 245006053 References: <338CEEA4.93867B6D@iinet.net.au> <338E3601.3E7E@onlink.net> Reply-To: johnvolan@sprintmail.com Newsgroups: comp.lang.ada Date: 1997-05-30T00:00:00+00:00 List-Id: David H. Haley wrote: > > -- I'm having a bit of a problem with Ada_Io.get after a Data_Error is > raised, > -- and am wondering if anyone can shed some light on this. This is a FAQ. The problem is, when an Integer_IO.Get fails with a Data_Error, the offending characters aren't eaten up. They remain in file input stream, ready to offend again. Clearly, your exception handler needs to do something more than simply re-trying the Get: It must clean out those offending characters. Try doing a Skip_Line. ------------------------------------------------------------------------ Internet.Usenet.Put_Signature (Name => "John G. Volan", Employer => "Texas Instruments Advanced C3I Systems, San Jose, CA", Work_Email => "johnv@ti.com", Home_Email => "johnvolan@sprintmail.com", Slogan => "Ada95: World's *FIRST* International-Standard OOPL", Disclaimer => "My employer never defined these opinions, so using " & "them would be totally erroneous...or is that just " & "nondeterministic behavior now? :-) "); ------------------------------------------------------------------------