The following explanation is from the Rhino Developer Docs
Empty
When you declare a variable in VBScript, the variable’s value before the first assignment is undefined, or
Empty
.Dim varValue ' Empty value
So basically,
Empty
says “I am an uninitialized variant.” If you need to detect whether a variable actually is an empty variant and not a string or a number, you can useIsEmpty
. Alternatively, you could useTypeName
orVarType
, butIsEmpty
is best.
So Empty
is used for declaring variables. If you declare a variable, you reserve storage at the stack, but what is the value of Empty on the Stack?
VBScript variables are of type
Variant
. A variant represents a value that can change type. In memory, the Variant type is a 16 byte structure.If the variable is empty (
Empty
value), then thevt
member (that stores the type of the data referenced by the variable) will have a value of0x0000
(VT_EMPTY
)