Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704a-Liber) Newsgroups: comp.lang.c Subject: Re: == vs = Message-ID: <3519@ihlpf.ATT.COM> Date: 28 Jan 88 00:07:22 GMT References: <11216@brl-adm.ARPA> <2111@chinet.UUCP> <4403@garfield.UUCP> <3208@bunker.UUCP> <3484@ihlpf.ATT.COM> <4439@garfield.UUCP> Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 20 In article <4439@garfield.UUCP> john13@garfield.UUCP (John Russell) writes: .>In article <3208@bunker.UUCP> garys@bunker.UUCP (Gary M. Samuelson) writes: .>.1. I don't find the implicit test for zero "distasteful" -- I find .>. hard-to-read code distasteful. Actually, "taste" is irrelevant. . .Might I propose a solution then? . .if (q == fn()) /* or if (fn() == q) which some people prefer */ ----------------------^^^^^^^^^^^^^^------------------------------------------ [Note: This is taken slightly out of context.] This type of thing would solve the '= vs. ==' problem. If constants and functions were put on the left side of the equal comparison, the C compiler would usually flag this as an error if '=' were put in place of '==' by mistake. -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_