Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!mit-eddie!bu.edu!mirror!necntc!necssd!harrison From: harrison@necssd.NEC.COM (Mark Harrison) Newsgroups: comp.lang.c Subject: Re: Matching Data Types Message-ID: <324@necssd.NEC.COM> Date: 4 May 90 15:58:14 GMT References: <1990Apr27.000956.13201@mccc.uucp> <1990Apr30.164553.1693@utzoo.uucp> <1639@tkou02.enet.dec.com> Organization: NEC America Inc. SSD, Irving, TX Lines: 18 In article <1639@tkou02.enet.dec.com>, diamond@tkou02.enet.dec.com (diamond@tkovoa) writes: > False. In an implementation where sizeof(int)==1 (perfectly legal, as > long as it's at least 16 bits), EOF might also be a valid char value. But doesn't this conflict with K&R/1 p.42? "The real reason for using int instead of char is not related to any questions of possible sign extension. It is simply that getchar must return all possible characters (so that it can be used to read arbitrary input) and, in addition, a distinct EOF value. Thus its value *cannot* be represented as a char, but must instead be stored as an int." [emphasis on *cannot* theirs] -- Mark Harrison harrison@necssd.NEC.COM (214)518-5050 {necntc, cs.utexas.edu}!necssd!harrison standard disclaimers apply...