Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!nrl-cmf!mailrus!cornell!rochester!uhura.cc.rochester.edu!ur-valhalla!badri From: badri@valhalla.ee.rochester.edu (Badri Lokanathan) Newsgroups: comp.lang.c Subject: Re: `if (a = b)' (was Standard indentation?) Summary: Why? Message-ID: <1683@valhalla.ee.rochester.edu> Date: 13 Dec 88 19:41:59 GMT References: <1988Dec8.173158.11839@utzoo.uucp> <846@starfish.Convergent.COM> <14945@mimsy.UUCP> Organization: UR Dept. of Electrical Engg, Rochester NY 14627 Lines: 18 In article <14945@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: > I still prefer two separate statements, with one exception: > (example follows.) I am missing something here. Why is a = expr; if (a == b) {statement} preferable, in general, to if ((a = expr) == b) {statement} I think the second form is more concise and often more readable, as per K & R II ed., pp. 16-17. -- "I care about my fellow man {) badri@ee.rochester.edu Being taken for a ride, //\\ {ames,cmcl2,columbia,cornell, I care that things start changing ///\\\ garp,harvard,ll-xn,rutgers}! But there's no one on my side."-UB40 _||_ rochester!ur-valhalla!badri