When do you use "if ( a = b )"? (was Re: Funny mistake)

Mike Sangrey mike at sojurn.UUCP
Mon Mar 25 08:03:55 AEST 1991


>) In article <775 at camco.Celestial.COM> bill at camco.Celestial.COM (Bill Campbell) writes:
>) [concerning "if ( a = b )"
>) 
>) [Deleted ...]
>) 
>) It's been my mistake everytime I've done it!! 

As an aside:  you should get into the habit of putting the constant and
function calls on the left of '=='.  That way when you mess up with a '='
the compiler will 'Bzzzzzt'.  The major problem with this idea is it looks
funny.  Of course, if we all did it this way ... ;-)

mike
----------
"It muddles me rather."  Pooh with apologies to A. A. Milne



More information about the Comp.lang.c mailing list