[thelist] [ASP] Dynamically resizing multi-dimensional array

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Fri Dec 27 08:18:01 CST 2002


>I've tested just about everything with response.write, and the only
>thing that doesn't seem to work is the indicated line. It works in the
>first pass of the loop, (tried with an Exit Do after the indicated line)
>but when I try to resize aDefinition after this dynamically, I get a
>"Subscript out of range" error. I'm having trouble locating a
>tutorial/article on resizing dynamic arrays, but I assume I'm trying to
>go about this the wrong way. Can anyone enlighten me?

I've run into this exact same problem. I just took the easy shortcut route
and maintained two separate arrays in synch with each other. In other words,
instead of one two-dimensional array I used two one-dimensional arrays and
used the same index pointer variable to step through each one. Worked
perfectly, though you do have to keep up with two arrays now instead of one.

Like I said though, it was the easy way out. :)

I hope .NET has changed this behavior.

HTH,
-dave



More information about the thelist mailing list