Re: = and ==
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>) |