Referencing a Multi-Dim Array Within A Multi-Dim A

Results 1 to 3 of 3

Thread: Referencing a Multi-Dim Array Within A Multi-Dim A

  1. #1
    MG Guest

    Default Referencing a Multi-Dim Array Within A Multi-Dim A

    I have inserted a multidimensional array within a multidimensional array. I cannot figure out how to reference the internal array. The second array is held in the 8th postion of the first array on each array row. I do not get any errors when inserting the second array into the first or using ubound on the second array. I have tried several other thing with no success and have searched everywhere to no avail. This is the error I get with the code below. Thanks<BR><BR>==================================== =====<BR>Microsoft VBScript compilation error &#039 800a03ee&#039 <BR><BR>Expected &#039)&#039 <BR><BR>/formtest.asp, line 124 <BR><BR>x = x & fldarray((0,n),i)<BR>-------------------^<BR>====================================== <BR><BR>function CreateForm(frmarray, fldarray)<BR> dim x, i<BR> x = ""<BR> numcols= 8<BR> numrows=ubound(fldarray,2)<BR> <BR> For i = 0 to numrows - 1<BR> &#039determine how many radios<BR> dim radiorows, n<BR> radiorows=ubound(fldarray(8,i),2) &#039THIS WORKS<BR> response.Write " r: " & radiorows<BR> <BR> For n=0 TO radiorows<BR> x = x & fldarray(8(0,n),i)<BR> x = x & "value=&#039" & fldarray(8(1,n),i) <BR> x = x & "&#039 " & fldarray(8(2,n),i) & "&#062;"<BR> Next<BR>Next<BR><BR>CreateForm = x<BR>End Function<BR><BR>

  2. #2
    subzer0 Guest

    Default RE: Referencing a Multi-Dim Array Within A Multi-D

    I don&#039t know if this will work - I didn&#039t test it but you can&#039t lose by trying:<BR>fldarray(8, i)(0, n)<BR><BR>If it doesn&#039t work then you might want to assign the included array to a new one and use the that instead, something like:<BR><BR>newarray=fldarray(8, i)<BR>something = newarray(o, n)

  3. #3
    MG Guest

    Default Thanks - It worked

    Your first idea worked!!! Thanks alot. Learn something new everyday!!

Posting Permissions

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