YouTip LogoYouTip

Vbscript Ref Keywords

# VBScript Keywords * * * ## VBScript Keywords | Keyword | Description | | :--- | :--- | | Empty | Used to indicate an uninitialized variable value. When a variable is first created or explicitly set to empty, its value is uninitialized and it has not been assigned a value. Example: Dim x 'Variable x is uninitialized! x="ff" 'Variable x is no longer uninitialized x=Empty 'Variable x is uninitialized! **Note:** This is different from Null!! | | IsEmpty | Used to test whether a variable is uninitialized. Example: If (IsEmpty(x)) 'Is variable x uninitialized? | | Nothing | Used to indicate an uninitialized object value, or to detach an object variable from an object to release system resources. Example: Set myObject=Nothing | | Is Nothing | Used to test whether a value is an uninitialized object. Example: If (myObject Is Nothing) 'Is it unset? **Note:** If you compare a value with Nothing using =, you will not get the correct result! Example: If (myObject = Nothing) 'Always false! | | Null | Used to indicate that a variable does not contain valid data. Null sets the value to "invalid", whereas Empty means the value is "unset". **Note:** This is different from Empty or Nothing!! Example: x=Null 'x contains no valid data | | IsNull | Used to test whether a value contains invalid data. Example: if (IsNull(x)) 'Is x invalid? | | True | Used to indicate that a Boolean condition is true (True is -1) | | False | Used to indicate that a Boolean condition is false (False is 0) |
← Vb Func DatediffVbscript Ref Functions β†’