Path: utzoo!attcan!uunet!husc6!mailrus!cornell!uw-beaver!ubc-cs!van-bc!rsoft!frank From: frank@rsoft.UUCP (Frank I. Reiter) Newsgroups: comp.lang.c Subject: Re: `if (a = b)' (was Standard indentation?) Message-ID: <5@rsoft.UUCP> Date: 11 Dec 88 17:21:43 GMT References: <1988Dec8.173158.11839@utzoo.uucp> <846@starfish.Convergent.COM> <14945@mimsy.UUCP> Reply-To: frank@rsoft.UUCP (Frank I. Reiter) Organization: Reiter Software Inc. Lines: 27 > Is if(a = b + c/4) (or something like this) legal ? I do it all the time, but I do it like this : |---- | if(a = b + c/4) /* Note assignment */ | whatever(); |---- Similarly I sometime code a switch like this : |---- | switch(somevar) { | case DELETE : | deletesomething(); | /* Note fall-through */ | case NEXT : | gotonextone(); | break; | case ...... |---- -- *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* Frank I. Reiter \ / UUCP: {uunet,ubc-cs}!van-bc!rsoft!frank Langley, British Columbia / \ BBS: Mind Link @ (604)533-2312 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*