Reply:
Defined facie know, in fact, are equivalent ... is 0, just different aliases only.
# Ifndef NULL
# Define NULL __ DARWIN_NULL
# Endif / *! NULL * /
# Ifndef nil
# Define nil NULL
# Endif / *! Nil * /
Reply:
Letter is 0 then, it was really empty
0 and empty or differentiated
Reply:
What you say is an empty string, right? There is an empty string value, a string of 0's ...
nil, NULL pointer is used in more or where the pointer is set to NULL to avoid dangling pointers ...
Reply:
IOS development, you only nil like, the other is not!
VC like the BOOL and bool is a difference, but in IOS, you only use uppercase BOOL on it, simply do not care about the difference between them, because you do not have a lowercase bool!
Reply:
Differentiated
[NSNull null]
nil
xxx == nil
[Xxx isEquals: [NSNull null]]
Met a JSON return result {"aaa": null}
Will be parsed as NSNull rather than nil
This time xxx == nil is judged not out, will cause the program Ben collapse
Reply:
nil represents an object pointer is null,
for objectsNil represents a class pointer is null, for the class
NULL represents the basic data types is empty, the basic types
No comments:
Post a Comment