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

Anthony Lapadula al at unhd.unh.edu
Wed Mar 20 08:36:05 AEST 1991


In article <357 at ptcburp.ptcbu.oz.au> michi at ptcburp.ptcbu.oz.au (Michael Henning) writes:
>grover at sonny-boy.cs.unlv.edu (Kevin Grover) writes:
>
>Simply say 1000 times:
>
>	"I shalt never again use = instead of ==".

The way I remember this is simple.  I've made a mental note that "=="
is two characters long, as are "<=" and ">=".  When I read code to myself,
these latter two come out as "less than or equal" and "greater than or
equal";  "==" comes out as "equal equal."

Heck, maybe it only works for me.  :-)

-- Anthony (uunet!unhd!al, al at cs.unh.edu) Lapadula



More information about the Comp.lang.c mailing list