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?
Date: 27 Aug 93 03:01:36 GMT [thread overview]
Message-ID: <25jteg$6e7@neomimsy.cs.umd.edu> (raw)
In article <fmoore.8@dseg.ti.com> 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
next reply other threads:[~1993-08-27 3:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-08-27 3:01 dog.ee.lbl.gov!agate!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefs [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-08-27 15:22 How to reset 'end_error' using text_io? Keith Shillington
1993-08-27 13:03 Dave Collard x7468
1993-08-27 12:50 cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.
1993-08-27 2:32 Michael Feldman
1993-08-26 20:42 Dave Colla rd x7468
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox