From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 27 Aug 93 02:32:37 GMT From: seas.gwu.edu!mfeldman@uunet.uu.net (Michael Feldman) Subject: Re: How to reset 'end_error' using text_io? Message-ID: <1993Aug27.023237.20864@seas.gwu.edu> List-Id: In article <25h05c$3lv@neomimsy.cs.umd.edu> alex@cs.umd.edu (Alex Blakemore) wr ites: >In article fmoore@dseg.ti.com (Freeman L. Moore) writes : >> So, how can io_exceptions.end_error on standard input be cleared >> permitting subsequent GETs to continue reading? > >text_io.skip_line I believe. >-- Would that it were (portably) so. Trouble is, that the End_Error was raised because you bumped into EOF, which has a nasty tendency of causing the file to be closed. And since you can't reopen Standard_Input, you are stuck, at least in my experience (your implementation mileage may vary). My guess is that if you really need to do this, you could open the file as a named file associated with the device. Then you could (maybe) Reset it. We had this discussion on the net about a year ago when my students got burned by an incorrect example of mine, showing a handler for End_Error that tried to keep going in the file. Tilt. I think the upshot of the thread was that no solution will be portable. Oh well. Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman - co-chair, SIGAda Education Committee Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5253 (voice) - 202-994-0227 (fax) - mfeldman@seas.gwu.edu (Internet) "We just changed our CONFIG.SYS, then pressed CTRL-ALT-DEL. It was easy." -- Alexandre Giglavyi, director Lyceum of Information Technologies, Moscow. ------------------------------------------------------------------------