comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Re: How to reset 'end_error' using text_io?
Date: 27 Aug 93 02:32:37 GMT	[thread overview]
Message-ID: <1993Aug27.023237.20864@seas.gwu.edu> (raw)

In article <25h05c$3lv@neomimsy.cs.umd.edu> alex@cs.umd.edu (Alex Blakemore) wr
ites:
>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?
>
>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.
------------------------------------------------------------------------

             reply	other threads:[~1993-08-27  2:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-27  2:32 Michael Feldman [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  3:01 dog.ee.lbl.gov!agate!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefs
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