Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!hao!oddjob!gargoyle!ihnp4!ihlpg!tainter From: tainter@ihlpg.ATT.COM (Tainter) Newsgroups: comp.lang.c Subject: Re: == vs = Message-ID: <4720@ihlpg.ATT.COM> Date: 29 Jan 88 16:42:39 GMT References: <11216@brl-adm.ARPA> <2111@chinet.UUCP> <4403@garfield.UUCP> <3519@ihlpf.ATT.COM> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 17 In article <3519@ihlpf.ATT.COM>, nevin1@ihlpf.ATT.COM (00704a-Liber) writes: >.if (q == fn()) /* or if (fn() == q) which some people prefer */ >-------------------------^^^^^^^^^^^^^^-------------------------------- > [Note: This is taken slightly out of context.] [Note: Taken even further 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. But only for constants and functions! Thus it just gives you a false sense of security. > _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 --j.a.tainter