Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!lll-tis!mordor!sri-spam!rutgers!topaz.rutgers.edu!ron From: ron@topaz.rutgers.edu.UUCP Newsgroups: comp.lang.c Subject: Re: Writing readable code Message-ID: <13221@topaz.rutgers.edu> Date: Wed, 8-Jul-87 14:28:31 EDT Article-I.D.: topaz.13221 Posted: Wed Jul 8 14:28:31 1987 Date-Received: Sat, 11-Jul-87 15:04:15 EDT References: <1158@copper.TEK.COM> <6858@auspyr.UUCP> <17171@cca.CCA.COM> <221@amanue.UUCP> <1221@ius2.cs.cmu.edu> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 8 If your variable "c" is a character, all of your alternatives are wrong. EOF is an integer -1 return from getchar. If you cast it (or assign, same thing) to char before the test, at best you can hope for is that you will only get misleading information from time to time (in the case that 0xFF was really input) or that it doesn't work at all (where (char) -1 is 0xFF and won't ever equal -1). -Ron