当前位置: 首页 > 网络学院 > 客户端脚本教程 > VBScript > VBScript 关键字
关键字 | 描述 |
---|---|
empty | Used to indicate an uninitialized variable value. A variable value is uninitialized when it is first created and no value is assigned to it, or when a variable value is explicitly set to empty. 举例: Note: This is not the same as Null!! |
isEmpty | Used to test if a variable is uninitialized. 举例: If (isEmpty(x)) 'x是否为初始化变量? |
nothing | Used to indicate an uninitialized object value, or to disassociate an object variable from an object to release system resources. 在 VBScript 中,Nothing 关键字用于取消某对象变量与实际对象的关联。 举例: set myObject=nothing |
is nothing | Used to test if a value is an initialized object. 用来测试对象有无初始化 举例: If (myObject Is Nothing) '它是否建立? 注意: If you compare a value to Nothing, you will not get the right result! Example: If (myObject = Nothing) 'always false! |
null | Used to indicate that a variable contains no valid data. Null 关键字用于指明变量包含的数据无效 One way to think of Null is that someone has explicitly set the value to "invalid", unlike Empty where the value is "not set". Note: This is not the same as Empty or Nothing!! Example: x=Null 'x contains no valid data |
isNull | Used to test if a value contains invalid data. 用来测试包含的是否为有效数据 Example: if (isNull(x)) 'is x invalid? |
true | Used to indicate a Boolean condition that is correct (true has a value of -1) True 关键字的值等于 -1。 |
false | Used to indicate a Boolean condition that is not correct (false has a value of 0) False 关键字的值为零。 |