Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!peregrine!ccicpg!legs!ssi!tom From: tom@syssoft.com (Rodentia) Newsgroups: comp.lang.c Subject: Re: One more point regarding = and == (more flamage) Message-ID: <1991Apr4.215605.2801@syssoft.com> Date: 4 Apr 91 21:56:05 GMT References: <925@isgtec.UUCP> <1991Mar26.184245.3538@chinet.chi.il.us> <11563@dog.ee.lbl.gov> <3555@inews.intel.com> <3465@litchi.bbn.com> Reply-To: tom@ssi.UUCP (Rodentia) Organization: Systems & Software, Inc., Irvine, CA Lines: 17 In article <3465@litchi.bbn.com> rsalz@bbn.com (Rich Salz) writes: >In <3555@inews.intel.com> bhoughto@hopi.intel.com (Blair P. Houghton) writes: >>toupper.c: while ( (int) (c = getchar()) != EOF ) >The cast implies that c is char. If so, this line is buggy. Does this mean that there if c is char, there is no way to assign the getchar and test it for EOF without having it cast down to char? Or would "while (((int)c = getchar()) != EOF)" do it? If so, would "while ((((int)(*c++)) = getchar()) != EOF)" cause improper incrementation, access, both, or worse? -- Thomas Roden | tom@syssoft.com Systems and Software, Inc. | Voice: (714) 833-1700 x454 "If the Beagle had sailed here, Darwin would have | FAX: (714) 833-1900 come up with a different theory altogether." - me |