condition convention 'if (10 == j)...'
Bill Shannon
shannon at sun.uucp
Thu May 2 17:03:48 AEST 1985
> >I tend to read this in terms of
> >"if variable equals constant" and try to figure out how the value
> >"10" is ever going to change! YUCK YUCK YUCK!!!!
>
> If you expect j to change when you read `if (j == 10)', then you are
> sorely in need of ways to differentiate between assignment and
> comparison!!!
If j can't change, why are you testing whether or not it is equal
to 10 right now? If j is a constant then pick the appropriate arm
of the if-else and use just it.
Bill Shannon
P.S. Don't you just love religious arguments? I know I'm having fun!
More information about the Comp.lang.c
mailing list