comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hyrosen@mail.com>
Subject: Re: Binding to feof
Date: Mon, 30 Aug 2004 13:16:57 -0400
Date: 2004-08-30T13:16:57-04:00	[thread overview]
Message-ID: <1093886217.765346@master.nyc.kbcfp.com> (raw)
In-Reply-To: <6cAYc.2378$w%6.414@newsread1.news.pas.earthlink.net>

Jeffrey Carter wrote:
> That would explain it. That seems to make the function useless, since 
> the other operations in my binding raise an exception if an operation 
> fails by reaching the end of file.

You cannot have anticipatory feof from the keyboard without actually
trying to read data and perhaps blocking, and in C, keyboard and file
I/O use the same mechanism. So instead, feof was designed to be after
the fact, so that when a read fails, you can check whether it was due
to EOF or some other reason.



      reply	other threads:[~2004-08-30 17:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-27 18:14 Binding to feof Jeffrey Carter
2004-08-27 21:07 ` Jerry van Dijk
2004-08-28  1:48   ` Jeffrey Carter
2004-08-28  2:25     ` Steve
2004-08-28 18:51       ` Jeffrey Carter
2004-08-28 10:26     ` Eric Jacoboni
2004-08-29  0:15 ` Keith Thompson
2004-08-30  6:56   ` Jeffrey Carter
2004-08-30 17:16     ` Hyman Rosen [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