iPhone:nil vs Nil与true vs TRUE之间的差异 [英] iPhone : Difference between nil vs Nil and true vs TRUE

查看:129
本文介绍了iPhone:nil vs Nil与true vs TRUE之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS开发中 nil Nil 有什么区别?

What is difference between nil and Nil in iOS development?

同样, true TRUE 之间的区别是什么?在iOS开发中?

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

推荐答案

我想这会帮助您理解 nil 之间的区别

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

请找到以下链接:

请参阅Damien_The_Unbeliever的答案,其中说明:

Refer the answer of Damien_The_Unbeliever which states:

Google搜索Nil vs nil发现此帖子 http://numbergrinder.com/node/49 ,其中说明:

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


这三个值都表示null或零指针值。
的区别在于,对于任何指针,NULL表示零,nil是特定于对象的
(例如,id),Nil特定于类指针。
在适当的环境中使用正确的null
对象进行记录时应该被认为是最佳实践,即使是
,但是没有什么可以阻止某人混合和匹配为
他们一起去。

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.

这个答案的链接可以在这里看到:

'Nil'在Obj中代表什么? C?

EDIT-2:

两者之间是否存在差异是/否,TRUE / FALSE以及objective-c中的真/假?

这篇关于iPhone:nil vs Nil与true vs TRUE之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆