Re: [Obj-C] if (self) vs. if (self != nil)
Re: [Obj-C] if (self) vs. if (self != nil)
- Subject: Re: [Obj-C] if (self) vs. if (self != nil)
- From: Greg Parker <email@hidden>
- Date: Fri, 24 Feb 2012 12:34:08 -0800
On Feb 24, 2012, at 6:50 AM, Oleg Krupnov <email@hidden> wrote:
> I also heard that generally speaking NULL is not necessarily always
> equal to 0 on all architectures.
In practice, NULL is always 0. Any exceptions were ancient historical oddities that you can ignore.
In principle, the C language says that NULL must behave as if it were zero, but that the bit pattern of a null pointer in memory is not necessarily zero.
http://c-faq.com/null/machnon0.html
http://c-faq.com/null/varieties.html
http://c-faq.com/null/machexamp.html
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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