Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!paperboy!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: When do you use "if ( a = b )"? Message-ID: <15590@smoke.brl.mil> Date: 26 Mar 91 22:28:53 GMT References: <1991Mar18.195351.11985@unlv.edu> <11109@dog.ee.lbl.gov> <15053@ganymede.inmos.co.uk> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 11 In article <15053@ganymede.inmos.co.uk> conor@inmos.co.uk (Conor O'Neill) writes: >To me it is clear that using assignments inside conditions is very bad >style because it makes the intention of the original programmer unclear. I think it depends on context and familiraity with common C idioms. Consider while ( (c = getchar()) != EOF ) ... I know of no clearer expression of this common operation.