★★★nil nul是什么意思,有什么作用,怎样使用?我给分。谢谢(20分)

B

bcfans

Unregistered / Unconfirmed
GUEST, unregistred user!
★★★nil nul是什么意思,有什么作用,怎样使用?我给分。谢谢
 
都 0 表示空指针,空串。

nil 是delphi,pascal 中的常量
null 是C 和 API 中的常量
 
在Object Pascal中,nil表示空指针,NULL是Variant变量未赋值状态,
还有Empty指Variant 变量赋了空值。
 
nil空指针
NULL是Variant变量赋了空值
 
nil是空指针
Null是函数,下面是帮助文件的内容
function Null: Variant;
Description
Use Null to obtain a Null variant that can indicate unknown or missing data. Null Variants can be assigned to variant variables in an application that must contain a null value. Assigning Null to a variant variable does not cause an error, and Null can be returned from any function with a variant return value.
Assigning Null to a variable of any type other than Variant causes either a compile-time error or raises an EVariantTypeMismatch exception. For example, in the following code the assignment of v, the Null variant, to variant q is successful
whereas the conversion of variant v, which is now Null, to the integer return type of the Test function, raises an exception.
 
nul 是空指钟
和C里面的NULL是一个意思
 
多人接受答案了。
 
顶部