comp.lang.ada
 help / color / mirror / Atom feed
* Philosophical Question (End_Of_File)
@ 2000-02-11  0:00 Wes Groleau
  2000-02-11  0:00 ` Gautier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wes Groleau @ 2000-02-11  0:00 UTC (permalink / raw)


We're taught to embed file input statements inside a control structure
with an End_Of_File test, right?

The idea is that instead of reading and then handling the exception, we
avoid the exception, right?

So why do some vendors implement End_Of_File something like this?

function End_Of_File (....) is
   begin
      Read_Without_Advancing;
      return False;
   exception
      when End_Of_File => return True;
   end End_Of_File;

I know of at least three that do this.  It can't be easier--somewhere
down in the lower level, the end of file had to be detected and the
exception raised.

Am I missing something?

-- 
Wes Groleau
http://freepages.genealogy.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-03-14  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-11  0:00 Philosophical Question (End_Of_File) Wes Groleau
2000-02-11  0:00 ` Gautier
2000-02-12  0:00   ` Gautier
2000-02-12  0:00     ` Pascal Martin
2000-02-13  0:00 ` Robert Dewar
2000-03-14  0:00   ` CFP OOPSLA 2000 Sherman Alpert
2000-02-14  0:00 ` Philosophical Question (End_Of_File) John English

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