VBScript. Session 2. What we learn last session?. Data types. Declaring, assigning and usage of variables. Option Explicit statement. VBScript keywords (Null,True … ) Scope and liftime of variables. Rem statement. Subjets for Session 2. Scalar variables and array variables.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
A(0) = 256 A(1) = 324 A(2) = 100 . . . A(10) = 55
Similarly, the data can be retrieved from any element using an index into the particular array element you want. For example:
SomeVariable = A(8)
Dim MyTable(5, 10)
To use a dynamic array, you must subsequently use ReDim to determine the number of dimensions and the size of each dimension.
A subsequent ReDim statement resizes the array to 30, but uses the Preserve keyword to preserve the contents of the array as the resizing takes place.
There is no limit to the number of times you can resize a dynamic array, although if you make an array smaller, you lose the data in the eliminated elements.
ReDim X(10, 10, 10) . . . ReDim Preserve X(10, 10, 15)
If you make an array smaller than it was originally,
data in the eliminated elements is lost.