• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
= and ==
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

= 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.


  • Follow-Ups:
    • Re: = and ==
      • From: Steve Bird <email@hidden>
  • Prev by Date: Re: Copy/Paste not working from keyboard
  • Next by Date: Re: [ANN] Searchable Cocoa-Dev Web Archive (again)
  • Previous by thread: Re: Combo box on 800x600
  • Next by thread: Re: = and ==
  • Index(es):
    • Date
    • Thread