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: Alexander von Below <email@hidden>
- Date: Thu, 20 Nov 2008 19:45:48 +0100
Am 20.11.2008 um 16:27 schrieb Steve Mills:
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.
True. But this is exactly where the double-parenthesis syntax comes from
Alex
_______________________________________________
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