This section provides a quick introduction of VBScript data type, Variant, a list of subtypes: byte, integer, long, single, double, currency, string, Boolean, date, object, error, empty, and null.
Interestingly, VBScript has only one data type called "Variant",
which can be used store different kinds of data depending on
how it is used. This tells us that VBScript is a loosely typed,
or dynamically typed, language.
Even every piece of data in VBScript is considered as the same data type, "Variant",
it can be grouped into a specific category of data based on its value.
These categories of data are called subtypes.
VBScript supports the following 13 data subtypes:
Byte: Using 1 byte to express integers ranging from 0 to 255.
Integer: Using 2 bytes to express signed integers ranging from -32,768 to 32,767.
Long: Using 4 bytes to express signed integers ranging from -2,147,483,648 to 2,147,483,647.
Single: Using 4 bytes to express real numbers in floating-point format ranging
from -3.402823e38 to -1.401298e-45 for negative values,
and from 1.401298e-45 to 3.402823e38 for positive value.
Double: Using 8 bytes to express real numbers in floating-point format ranging
from -1.79769313486232e308 to -4.94065645841247e-324 for negative values,
and from 4.94065645841247e-324 to 1.79769313486232e308 for positive values.
Currency: Using 8 bytes to express real numbers in decimal format ranging from -922,337,293,685,477.5808 to
922,337,293,685,477.5807.
String: Using 1 byte per character to express a sequence of characters up to approximately 2 billion characters.
Boolean: Using 2 bytes to express two Boolean values: True and False.
Date: Using 8 bytes to express dates ranging from January 1, 100 to December 31, 9999.
Empty: A special subtype to represent a variable that has not been assigned with any value yet.
Null: A special subtype to represent a variable assigned with a null value.
Object: A special subtype to represent a reference to an object.
Error: A special subtype to represent an error number.
See next sections to learn how to use Variant and subtypes.