December 2001
Intermediate to advanced
480 pages
9h 22m
English
Arrays in VBScript and JavaScript are the same in concept but are put together a little differently. The multidimensional arrays in VBScript are easier to work with than their counterpart in JavaScript. Like variables, arrays begin with a Dim statement, but an array size is provided as well. The following shows a simple example:
<%
Dim item(3)
item(0) = "Greater Swiss Mountain Dogs"
item(1) = "Bernese Mountain Dogs"
item(2) = "Pyrenean Mountain Dogs"
Response.write item(2)
%> Note that, in VBScript, the array elements are in parentheses and not brackets, but, as in JavaScript, the first element is 0 and not 1.
If you are working with more than a single dimension and need to put it in an array in VBScript, you ...
Read now
Unlock full access