comp.lang.ada
 help / color / mirror / Atom feed
From: John English <je@bton.ac.uk>
Subject: Re: Philosophical Question (End_Of_File)
Date: 2000/02/14
Date: 2000-02-14T11:22:06+00:00	[thread overview]
Message-ID: <38A7E60C.F2CDA501@bton.ac.uk> (raw)
In-Reply-To: 38A4799B.6D2E7ABE@ftw.rsc.raytheon.com

Wes Groleau wrote:
> 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?

Sometimes you can't use End_Of_File reliably -- e.g. if you want
to read an integer from a file, End_Of_File may be false, but it
may become true in the process of skipping leading whitespace in
search of the start of the integer, so in this case you are forced
to use End_Error to detect the end of the file instead...

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` John English [this message]
replies disabled

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