Re: get rid of warning "suggest parenthesis around assignment used as truth value"
Re: get rid of warning "suggest parenthesis around assignment used as truth value"
- Subject: Re: get rid of warning "suggest parenthesis around assignment used as truth value"
- From: Steve Mills <email@hidden>
- Date: Thu, 20 Nov 2008 09:27:55 -0600
On Nov 20, 2008, at 07:32:14, Steve Sisak wrote:
if ((foo = 1) != 0) { ... }
or any other boolean test against the result of the assignment will
work as well and is a tad more clear.
That's MUCH more clear, and the correct way to write this code without
it being misinterpreted and possibly "corrected" (by changing it to
"blah == 1") by yourself or someone else in the future.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden