Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
750 views
in Technique[技术] by (71.8m points)

objective c - iPhone : Difference between nil vs Nil and true vs TRUE

What is difference between nil and Nil in iOS development?

And similarly what is difference between true and TRUE in iOS development?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I think this will help you understand the difference between nil and Nil.

Please find the below link:

Refer the answer of Damien_The_Unbeliever which states:

Googling "Nil vs nil" found this post http://numbergrinder.com/node/49, which states:

All three of these values represent null, or zero pointer, values. The difference is that while NULL represents zero for any pointer, nil is specific to objects (e.g., id) and Nil is specific to class pointers. It should be considered a best practice of sorts to use the right null object in the right circumstance for documentation purposes, even though there is nothing stopping someone from mixing and matching as they go along.

Link for that answer can be seen here:

What does 'Nil' represent in Obj-C?

EDIT-2:

Is there a difference between YES/NO,TRUE/FALSE and true/false in objective-c?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...