Skip navigation.
 
mlRe: if statement
FROM : Bob Smith
DATE : Tue May 27 23:45:53 2008

A way to help yourself with this (which I used to forget all the time 
too), get in the habit of placing the constant on the left side of 
the comparison, as in (1 == OB) instead of (OB == 1).  Then if you 
forget and use a single = the compiler will remind you, since (1 = 
OB) is invalid and won't compile!

Bob S.

On May 27, 2008, at 2:35 PM, Nathan wrote:
> ok this is the last time I'm admitting I messed up and getting 
> corrected. :lol:
>
> On May 27, 2008, at 5:32 PM, Scott Ribe wrote:
>

>> = is assignment, == is equality test, so yes the conditions of 
>> both ifs do
>> evaluate to true.
>>
>> --
>> Scott Ribe
>> <email_removed>
>> http://www.killerbytes.com/
>> (303) 722-0567 voice
>>
>>

>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlif statement Nathan May 27, 23:24
mlRe: if statement Nick Zitzmann May 27, 23:26
mlRe: if statement Wayne Packard May 27, 23:27
mlRe: if statement Nathan May 27, 23:28
mlRe: if statement Nathan May 27, 23:29
mlRe: if statement Nathan May 27, 23:31
mlRe: if statement Scott Ribe May 27, 23:32
mlRe: if statement Andy Lee May 27, 23:35
mlRe: if statement Nathan May 27, 23:35
mlRe: if statement Nathan May 27, 23:35
mlRe: if statement Randall Meadows May 27, 23:37
mlRe: if statement Bob Smith May 27, 23:45
mlRe: if statement Sherman Pendley May 28, 00:04
mlRe: if statement Graham Cox May 28, 02:11
mlRe: if statement Jens Alfke May 28, 05:52
mlRe: if statement Sean McBride May 28, 16:45
mlRe: if statement Sherm Pendley May 28, 17:21