= and ==
= and ==
- Subject: = and ==
- From: Markian Hlynka <email@hidden>
- Date: Tue, 25 May 2004 12:24:40 -0600
On May 25, 2004, at 8:13, email@hidden wrote:
On May 21, 2004, at 7:33 PM, David Blanton wrote:
I think that anyone who make the = when it should be == error more
than once
should reconsider their position. McDonalds has pictographs on their
keyboards to prevent this kind of error. :-|
Wow! I never realized those cash register operators were typing C
expressions when they took my order! I have a new found respect for
the quality of McDonald's employee training program.
Maybe if we all started using McDonald's cash registers for keyboards,
we could avoid the =, == mixup, too.
this is easily avoided in the case of comparison to constants etc.
instead of
int foo;
if (foo=0) //bug
make a point of
if (0=foo) //compiler error.
Of course, this doesn't work if you're comparing variables. :-(
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.