Path: utzoo!mnetor!uunet!vsi!friedl From: friedl@vsi.UUCP (Stephen J. Friedl) Newsgroups: comp.lang.c Subject: Re: == vs = Message-ID: <516@vsi.UUCP> Date: 10 Apr 88 17:05:43 GMT References: <11216@brl-adm.ARPA> <2111@chinet.UUCP> <4403@garfield.UUCP> <130@obie.UUCP> Organization: V-Systems, Inc. -- Santa Ana, CA Lines: 19 Summary: use of = in if < In article <226@hotlr.ATT>, dkc@hotlr.ATT (Dave Cornutt) writes: < > [...] D is another matter; catching the < > accidental misapplication of "=" in "if" statements would be worth it. < < The one thing that everyone seems to have forgotten in this discussion < is that `=' is NOT always invalid in and if clause: Just for the record, some of use both flavors in an |if| test... { FILE *fp; if (fp = fopen(file, "r"), fp == NULL) { ... -- Steve Friedl V-Systems, Inc. "Yes, I'm jeff@unh's brother" friedl@vsi.com {backbones}!vsi.com!friedl attmail!vsi!friedl