comp.lang.ada
 help / color / mirror / Atom feed
From: anagld!aplcen.apl.jhu.edu!ddsdx2.jhuapl.edu!dlc@uunet.uu.net  (Dave Colla rd x7468)
Subject: Re: How to reset 'end_error' using text_io?
Date: 26 Aug 93 20:42:15 GMT	[thread overview]
Message-ID: <1993Aug26.204215.6284@aplcen.apl.jhu.edu> (raw)

In <25h05c$3lv@neomimsy.cs.umd.edu> alex@cs.umd.edu (Alex Blakemore) writes:

>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.

nope.  end_error means end of file -- skip_line just skips to the 
next line.

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)
which might be more portable

--Thor
dlc@ddsdx2.jhuapl.edu

             reply	other threads:[~1993-08-26 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-26 20:42 Dave Colla rd x7468 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-27  2:32 How to reset 'end_error' using text_io? Michael Feldman
1993-08-27  3:01 dog.ee.lbl.gov!agate!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefs
1993-08-27 12:50 cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.
1993-08-27 13:03 Dave Collard x7468
1993-08-27 15:22 Keith Shillington
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox