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>
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 mails | Author | Date |
|---|---|---|
| Nathan | May 27, 23:24 | |
| Nick Zitzmann | May 27, 23:26 | |
| Wayne Packard | May 27, 23:27 | |
| Nathan | May 27, 23:28 | |
| Nathan | May 27, 23:29 | |
| Nathan | May 27, 23:31 | |
| Scott Ribe | May 27, 23:32 | |
| Andy Lee | May 27, 23:35 | |
| Nathan | May 27, 23:35 | |
| Nathan | May 27, 23:35 | |
| Randall Meadows | May 27, 23:37 | |
| Bob Smith | May 27, 23:45 | |
| Sherman Pendley | May 28, 00:04 | |
| Graham Cox | May 28, 02:11 | |
| Jens Alfke | May 28, 05:52 | |
| Sean McBride | May 28, 16:45 | |
| Sherm Pendley | May 28, 17:21 |






Cocoa mail archive

