vbscript dim array dynamic

 

 

 

 

While you do not have to use Dim to create new variables in VBScript, the wise programmer prefers to use Dim.Dim can also be used to create static (fixed) and dynamic arrays. A static array has the number of elements declared by the Dim statement. I used for the task associative array, which is in Ruby called hash and in VBscript dictionary.RE: Creating a dynamic, two-dimensional array. mrmovie (TechnicalUser) 22 Jun 10 09:56.Dim CountLines 1 Dim FirstLine "". Do Until objTextFile.AtEndOfStream strNextLine It can also be re-adjusted dynamically. Arrays can have multiple dimensions- VBScript supports up to 60. 1). Dim variablename(upperlimit) [As datatype].The size of the dynamic array changes during the time our script is running. The VBScript language provides support for arrays. You declare an array using the Dim statement, just as you did with variablesThese arrays are referred to as dynamic arrays. A dynamic array is declared without specifying the number of elements it will contain VBScript supports two kinds of multidimensional arrays, called rectangular and ragged.The ReDim statement is used to size or resize a dynamic array that has already been formally declared using a Private, Public, or Dim statement with empty parentheses (without dimension subscripts).