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/09 Message-ID: #1/1 X-Deja-AN: 583822188 Sender: hymie@calumny.jyacc.com References: <3890C62B.18309585@telepath.com> <876unj$jcs$1@nnrp1.deja.com> <87d7qck6pm.fsf@deneb.cygnus.argh.org> X-Complaints-To: abuse@panix.com X-Trace: news.panix.com 950130717 16575 209.49.126.226 (9 Feb 2000 21:11:57 GMT) Organization: PANIX Public Access Internet and UNIX, NYC NNTP-Posting-Date: 9 Feb 2000 21:11:57 GMT Newsgroups: comp.lang.ada Date: 2000-02-09T21:11:57+00:00 List-Id: Robert A Duff writes: > But "char" in C is just the smallest integer type. There's no reason to > believe that reading a "char" has anything to do with characters/text, > despite its misleading name. The C/C++ stream interface concerns itself with reading characters from input streams. The char type is able to hold any character read from a stream. This discussion is about how input functions can provide end-of-file notification. One way is to have an out-of-band value returned by the single-character reader function. The C way of doing this is to have the return type of that function be int. It is then the case that if the implementation has int and char the same size, and the input format is such that every possible bit pattern for char may be present, then this out-of-band method will not work, and one of the available alternate methods must be used, such as fread or feof. This situation is rare, and may even be non-existent. Do you feel that your comment has contributed anything to this discussion? To me it seems to be a snide and pointless attack on C.