Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site utastro.UUCP Path: utzoo!watmath!clyde!akgua!sdcsvax!sdcrdcf!hplabs!hao!seismo!ut-sally!utastro!nather From: nather@utastro.UUCP (Ed Nather) Newsgroups: net.unix-wizards Subject: Re: getc() != EOF Message-ID: <30@utastro.UUCP> Date: Sat, 26-May-84 22:35:34 EDT Article-I.D.: utastro.30 Posted: Sat May 26 22:35:34 1984 Date-Received: Fri, 1-Jun-84 02:20:42 EDT References: <1138@sri-arpa.UUCP> Organization: UTexas Astronomy Dept., Austin, Texas Lines: 22 [] > >In all conscience, > > while ( (c = getc()) != EOF ) > >ought to work. If somebody is to be blamed, it is surely not the >people who wrote the code, but the people who made a C implementation >that broke it. It will work if "c" is declared "int." It will not work if "c" is declared "char." Variable declarations are an essential part of the program, and should be included in illustrative code fragments, so problems are not concealed. Grumph. -- Ed Nather {allegra,ihnp4}!{ut-sally,noao}!utastro!nather Astronomy Dept., U. of Texas, Austin