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 03:01:36 GMT From: dog.ee.lbl.gov!agate!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefs d.com!darwin.sura.net!ra!cs.umd.edu!alex@ucbvax.Berkeley.EDU (Alex Blakemore) Subject: Re: How to reset 'end_error' using text_io? Message-ID: <25jteg$6e7@neomimsy.cs.umd.edu> List-Id: 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? then I replied >text_io.skip_line I believe. then Thor set me straight > nope. end_error means end of file -- skip_line just skips to the next line. OK, I was remembering using skip_line to solve a similar problem, when data_err or was raised on syntactically incorrect input using float_io. Thor again: > The following works, though vax specific: > open(file => f,mode => in_file, name => "SYS$OUTPUT"); > loop > begin > get_line(f, buf, last); > put_line("got " & buf(1..last)); > exception > when end_error => > close(f); > open(file => f,mode => in_file, name => "SYS$OUTPUT"); > end; > end loop; > instead of sys$output you could use text_io.name(text_io.standard_output) you might even have better luck if you use sys$input or text_io.standard_input. 8^) another thing to try would be to use text_io.reset (text_io.standard_input) instead of closing and reopening the file. unfortunately, I don't have access to the great VAX compiler to test this out. -- Alex Blakemore alex@cs.umd.edu NeXT mail accepted -------------------------------------------------------------- "Without an engaged and motivated human being at the keyboard, the computer is just another dumb box." William Raspberry