This section describes the array data type, Variant(). A tutorial example is provided to show how TypeName() and VarType() functions work on array values.
Earlier, we learned that VBScript supports only one data type: Variant,
The above statement needs to be revised now because of arrays.
VBScript supports only one data type, Variant, for scalar values.
Array is another data type supported in VBScript for non-scalar values.
A non-scalar value is a complex value that contains an internal structure
to store more than a single piece of data.
An array is non-scalar value that contains an array structure to store a list of scalar values.
Since there is only one data type, Variant, for scalar values,
VBScript only supports one array type: Array of Variant, or Variant()
Applying data type rules to variables, now we know:
A variable can be declared as a scalar variable using "Dim x".
A variable can be declared as an array variable using "Dim y()".
A scalar variable can be used to store a scalar value of data type, Variant.
An array variable can be used to store an array of scalar values of data type, Variant.
A scalar variable has a data type of Variant.
An array variable has a data type of Variant() - Array of Variant.
To show you the difference between a scalar variable and an array variable,
I wrote the following example, array_type.html: