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,6bf9d4ba0cfd8cb6 X-Google-Attributes: gid103376,public From: Hyman Rosen Subject: Re: Announce: OpenToken 2.0 released Date: 2000/02/07 Message-ID: #1/1 X-Deja-AN: 582887311 Sender: hymie@calumny.jyacc.com References: <3890C62B.18309585@telepath.com> <876unj$jcs$1@nnrp1.deja.com> <87d7qck6pm.fsf@deneb.cygnus.argh.org> <87ya8wok07.fsf@deneb.cygnus.argh.org> X-Complaints-To: abuse@panix.com X-Trace: news.panix.com 949968117 2584 209.49.126.226 (8 Feb 2000 00:01:57 GMT) Organization: PANIX Public Access Internet and UNIX, NYC NNTP-Posting-Date: 8 Feb 2000 00:01:57 GMT Newsgroups: comp.lang.ada Date: 2000-02-08T00:01:57+00:00 List-Id: Florian Weimer writes: > You are right for text files. For binary files, there has to be > a bijection between the internal and external representation of > characters. This means that the value EOF can occur in a binary stream > if sizeof(char) equals sizeof(int). Agreed. When you are coding for such a case in C or C++, you must then use one of the several input methods which separate content and status. In C, you can use fread, or test with feof. C++ additionally allows the use of istream.get(char &), which returns a status value.