• 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
Re: Avoiding == and = mixup in if statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoiding == and = mixup in if statements


  • Subject: Re: Avoiding == and = mixup in if statements
  • From: Chris <email@hidden>
  • Date: Fri, 21 May 2004 14:26:20 -0400

Heh :)

*shrug* I found switching the order of my compare to be not-so-bad. Though I guess if it's a matter of remembering vs. simple typos, you might have a point ;)

Chris

On Friday, May 21, 2004, at 01:32PM, Steve Bird <email@hidden> wrote:

>
>On May 21, 2004, at 12:26 PM, Chris wrote:
>
>> Or change your coding style so that your compares are done like this:
>>
>> if( nil == myObject )
>>
>> Then if you make a mistake and type if( nil = myObject ) you'll get an
>> error.
>
>
>Can you explain how I can remember to put the arguments in backwards,
>if I can't remember to use "==" instead of "="?
>
>
>----------------------------------------------------------------
>Steve Bird
>Culverson Software - Elegant software that is a pleasure to use.
>www.Culverson.com (toll free) 1-877-676-8175
_______________________________________________
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.


  • Prev by Date: Re: A few NSTextView questions...
  • Next by Date: Re: Avoiding == and = mixup in if statements
  • Previous by thread: Re: Avoiding == and = mixup in if statements
  • Next by thread: Re: Avoiding == and = mixup in if statements
  • Index(es):
    • Date
    • Thread