From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,39479d7149884fb6 X-Google-Attributes: gid103376,public From: John English Subject: Re: Philosophical Question (End_Of_File) Date: 2000/02/14 Message-ID: <38A7E60C.F2CDA501@bton.ac.uk>#1/1 X-Deja-AN: 585692384 Content-Transfer-Encoding: 7bit References: <38A4799B.6D2E7ABE@ftw.rsc.raytheon.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@bton.ac.uk X-Trace: saturn.bton.ac.uk 950527326 800 193.62.183.204 (14 Feb 2000 11:22:06 GMT) Organization: University of Brighton Mime-Version: 1.0 NNTP-Posting-Date: 14 Feb 2000 11:22:06 GMT Newsgroups: comp.lang.ada Date: 2000-02-14T11:22:06+00:00 List-Id: 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 -----------------------------------------------------------------