`if (a = b)' (was Standard indentation?)
Badri Lokanathan
badri at valhalla.ee.rochester.edu
Wed Dec 14 05:41:59 AEST 1988
In article <14945 at mimsy.UUCP>, chris at 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 at 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
More information about the Comp.lang.c
mailing list