• 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: = and ==
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: = and ==


  • Subject: Re: = and ==
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 25 May 2004 23:50:49 +0200

Well...

On 25.5.2004, at 21:57, Steve Bird wrote:

> Round and round and round we go, I guess it's my turn again...

First, for nil values skip the constant, "if (object) ..." or "if
(!object) ..." is better and not error-prone.

Second, there's the -Wparentheses option.

Third, if you found keeping the number of your ='s too difficult, well,
*never* use them in conditions, using instead something like

#define EQ ==
...
if (changeSheGaveMe EQ .47) printf("Thanks");
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


References: 
 >= and == (From: Markian Hlynka <email@hidden>)
 >Re: = and == (From: Steve Bird <email@hidden>)

  • Prev by Date: Bindings, enabling controls based on multiple values
  • Next by Date: Re: Action on NSButtonCell in NSTableView
  • Previous by thread: Re: = and ==
  • Next by thread: Re: = and ==
  • Index(es):
    • Date
    • Thread