Re: NSCalendarDate docs sample code
Re: NSCalendarDate docs sample code
- Subject: Re: NSCalendarDate docs sample code
- From: Ondra Cada <email@hidden>
- Date: Thu, 9 May 2002 02:13:02 +0200
On Thursday, May 9, 2002, at 12:39 , Diggory Laycock wrote:
This code doesn't seem to work unless "null" is replaced by "nil".
Is this an error in the docs or am I being very stupid? What is the
difference between nil and null?
Looks indeed like a Java-induced docs error. There's no "null" at all, and
never was.
The constants you can use -- all meaning actually zero -- are
NULL ... for pointers, like "char *cp=NULL;"
nil .... for instances, like "id obj=nil;"
Nil .... for classes, like "Class c=Nil;"
All are quite interchangeable though; the difference is only in program
readability. So far as compiler is concerned, you can use plain "0"
instead.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.