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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,dcb81b5322bf4a6d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!cyclone.tampabay.rr.com!news-post.tampabay.rr.com!cyclone2.kc.rr.com!news2.kc.rr.com!twister.socal.rr.com.POSTED!53ab2750!not-for-mail Sender: kst@nuthaus.mib.org Newsgroups: comp.lang.ada Subject: Re: Binding to feof References: From: Keith Thompson Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 29 Aug 2004 00:15:16 GMT NNTP-Posting-Host: 66.91.245.136 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1093738516 66.91.245.136 (Sat, 28 Aug 2004 17:15:16 PDT) NNTP-Posting-Date: Sat, 28 Aug 2004 17:15:16 PDT Organization: RoadRunner - West Xref: g2news1.google.com comp.lang.ada:3124 Date: 2004-08-29T00:15:16+00:00 List-Id: Jeffrey Carter 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 San Diego Supercomputer Center <*> We must do something. This is something. Therefore, we must do this.