Re: if statement
Re: if statement
- Subject: Re: if statement
- From: Jens Alfke <email@hidden>
- Date: Tue, 27 May 2008 20:52:10 -0700
If you make this mistake often, go into your Project inspector, click
the Build tab, and look for the item "Missing Braces And Parentheses"
under "Warnings". Check its checkbox. This will cause the compiler to
warn you when you do this. I also highly recommend enabling the "Treat
Warnings As Errors" checkbox nearby, so that you can't miss the warning.
—Jens
On 27 May '08, at 2:28 PM, Nathan wrote:
Thanks.... I always always always forget that lol.
On May 27, 2008, at 5:25 PM, Hal Mueller wrote:
On May 27, 2008, at 2:24 PM, Nathan wrote:
if (OB=1) {
That's an assignment statement. In particular, it's an assignment
statement that will always return true. You want (OB==1) or (1==OB).
H
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden