Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

VBScript keywords


May 13, 2021 VBScript


Table of contents


VBScript keywords

This section describes some of the common keywords in VBScript.

VBScript keywords

Keyword describe
Empty

Used to indicate a variable value that is not initialized.When the variable is created for the first time or when the variable value is set to empty, the variable value is not initialized and the variable is assigned.

Example:
DIM X 'variable X is not initialized!
X = "ff" 'variable X is no longer uninited
X = EMPTY 'variable X is not initialized!

Notice: This is different from NULL!!

IsEmpty

It is used to test whether a variable is not initialized.

Example: IF (ISEMPTY (X)) 'variable X is not initialized?

Nothing Used to indicate an uninitialized object value, or separate object variables from objects for release system resources.

Example: set myObject = Nothing

Is Nothing Used to test if a value is an object that is initialized.

Example: IF (myObject is nothing "Is it not set?

Notice: If you compare a value with Nothing, you will not get the correct result!Example: if (myObject = Nothing) 'is always an error!

Null Used to indicate that variable does not contain valid data.

NULL sets the value to "invalid", and EMPTY indicates that the value "is not set".

Notice: This is different from EMPTY or NOTHING!!

Example: x = NULL 'X does not contain valid data

IsNull Used to test if a value contains invalid data.

Example: IF (isnull (x)) 'X is invalid?

True Used to indicate a Boolean condition is correct (TRUE is -1)
False Used to indicate that a Boolean condition is incorrect (FALSE is 0)