Do you have a scripting-related question or problem? You can send your question or problem to winscriptsol@winnetmag.com.
I'm writing a script in which I need to create and populate a VBScript 2-D array, then multiply each element in the array by a constant. However, I'm not sure how to proceed. Can you help?
The key to working with VBScript 2-D arrays is simple: Visualize the array as a table in memory. Just like a table, a 2-D array contains rows and columns. To identify the location of elements in an array, you use numbers or variables called subscripts. VBScript array subscripts are zero-based, so the following VBScript statement defines a 2-D array called Table that contains 10 rows (subscripts 0 through 9) and five columns (subscripts 0 through 4):
Dim Table(9,4)
To store a value in a specific cell in the 2-D array, you use subscripts to specify the cell coordinates. For example, to store the value 0 in the cell at row 1, column 1, you'd specify
Table(0,0) = 0
Similarly, to store the value 49 in the cell at row 10, column 5, you'd specify . . .