[T]he number of times that I've seen the = used in
C conditionals
instead of == is amazing.
One of the relatively few good things I have to say about gcc is that
it has a large assortment of warning options that, when set suitably,
alleviate some of the worst issues I have with C.
To deal with this particular bit of lossage, it's -Wparentheses.
Say what you want about FORTRAN, but the .EQ.
conditional test could
never be mistaken for an assignment.
True.
But I'd much prefer to fix this particular problem by changing the
assignment operator rather than changing the equality-comparison
operator. Pascal had the right idea here, but I don't care for its
choice of thing to use for the assignment operator....
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B