comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst-u@mib.org>
Subject: Re: Binding to feof
Date: Sun, 29 Aug 2004 00:15:16 GMT
Date: 2004-08-29T00:15:16+00:00	[thread overview]
Message-ID: <lnk6vi4x3u.fsf@nuthaus.mib.org> (raw)
In-Reply-To: MRKXc.206$8d1.71@newsread2.news.pas.earthlink.net

Jeffrey Carter <spam@spam.com> writes:
> I've been experimenting with a binding to C's lightweight I/O library
> (fopen, fclose, feof, fgetc, fgets, fputc, fputs). Everything seems to
> work fine except feof, which always returns zero (False).

Keep in mind that C's feof() function returns true *after* an
attempted input operation has failed by reaching the end of the file;
Ada's End_Of_File function returns true if the *next* attempted input
will fail by reaching the end of the file.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
We must do something.  This is something.  Therefore, we must do this.



  parent reply	other threads:[~2004-08-29  0:15 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 [this message]
2004-08-30  6:56   ` Jeffrey Carter
2004-08-30 17:16     ` Hyman Rosen
replies disabled

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