Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!princeton!udel!rochester!bbn!husc6!sri-unix!quintus!sun!pitstop!sundc!seismo!uunet!mcvax!botter!ark!maart From: maart@ark.UUCP Newsgroups: comp.lang.c Subject: Priorities of = and == again (c'mon you ANSI freaks) Message-ID: <1171@ark.cs.vu.nl> Date: 15 Jan 88 22:44:18 GMT Reply-To: maart@cs.vu.nl (Maarten Litmaath) Organization: VU Informatica, Amsterdam Lines: 18 Posted: Fri Jan 15 17:44:18 1988 Lately I asked why the priorities of = and == were not reversed: while ((c = getchar()) == ' ') is used much more than while (c = getchar() == ' ') . I argued that ONLY programs containing code of the second form, need to be rewritten using parentheses; occurrences of those expressions are not hard to find using shelltools (SUN, yeah). Concluding, I'm not very impressed by the 'backward compatibility' argument used by ANSI and by Doug Gwyn, who responded to my previous article (thanks, Doug). Any further thoughts on this ? -- Time flies like an arrow, fruit flies |Maarten Litmaath @ Free U Amsterdam: like an orange. (seen elsewhere) |maart@cs.vu.nl, mcvax!botter!ark!maart