comp.lang.ada
 help / color / mirror / Atom feed
From: Wes Groleau <wwgrol@ftw.rsc.raytheon.com>
Subject: Philosophical Question (End_Of_File)
Date: 2000/02/11
Date: 2000-02-11T00:00:00+00:00	[thread overview]
Message-ID: <38A4799B.6D2E7ABE@ftw.rsc.raytheon.com> (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




             reply	other threads:[~2000-02-11  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-11  0:00 Wes Groleau [this message]
2000-02-11  0:00 ` Philosophical Question (End_Of_File) 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
replies disabled

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