Results 1 to 3 of 3

Thread: Arrays

  1. #1
    Rob Guest

    Default Arrays

    Got a poblem. I need to build a two-dimensional array.<BR><BR>Im not sure how to do this and then how to call it.<BR><BR>Im building a string like this:<BR><BR>Do until ....<BR>string = string & rslocations("srting") &"," & int(anotherstirng)&"," <BR>Loop<BR><BR><BR>How do I make that a two-dimensional array and then be able to print that ?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Arrays

    loop within loop, basically - you&#039;ll find some info in the VBScript language reference at<BR><BR>you&#039;ll also find some on<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default 2D array

    Dim arr2Dimensional (10,2)<BR>This will create a 2d array that is (depending on how you view arrays) 10 units "across" and 2 units "high".. i.e. if a dot (.) is a unit, you can view it this way...<BR><BR>..........<BR>..........<BR><BR>or you can view it this way...<BR><BR>..<BR>..<BR>..<BR>..<BR>..<BR>..<BR> ..<BR>..<BR>..<BR>..<BR><BR>this helps me visualize what goes on when i use an array, it may seem irrelevant, but you may thank me later...<BR>anyway, here&#039;s how you put data into the array, and access that data..<BR><BR>&#039; This code writes 10 data elements across and then goes down a row, and <BR>&#039; writes 1 more row of 10<BR>for Y = 0 to 1 &#039; always the size - 1<BR> for X = 0 to 9<BR> arr2Dimensional(X)(Y) = "this is in (" & X & "," & Y & ")"<BR> Next &#039;X<BR>Next &#039;Y<BR><BR>try it out! good luck and good night!<BR><BR>Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts