Array - function of language VBScript

Returns 1-dimensional array of values.
Array Array(Variant arglist)
arglist(Variant) Comma-delimited list of values that are assigned to the elements of the array. If no parameters are specified, then an array of zero length is created.
The notation used to refer to an item of the array consists of the variable name followed by parentheses containing an index number indicating the desired element.
In the following example, the first statement creates a variable named "A". The second statement assigns an array to this variable. The last statement assigns the value contained in the second array item to another variable.
VBScriptSelect and copy to clipboard

Dim A, B
A = Array(10, 20, 30)
B = A(1)   ' B=20
A variable of the array type can be created directly by the Dim statement. This array can be accessed in the same way:
VBScriptSelect and copy to clipboard

Dim B, A( 2)
A(0) = 10
A(1) = 20
A(2) = 30
B = A(1)   ' B=20
Caution: The Array function creates only 1-dimensional array. For creating multidimensional arrays it is necessary to use the statement Dim and ReDim.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.