`if (a = b)' (was Standard indentation?)

Frank I. Reiter frank at rsoft.UUCP
Mon Dec 12 03:21:43 AEST 1988


> 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
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*



More information about the Comp.lang.c mailing list