Re: if statement
Re: if statement
- Subject: Re: if statement
- From: Bob Smith <email@hidden>
- Date: Tue, 27 May 2008 14:45:53 -0700
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@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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
_______________________________________________
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