In Classic ASP (VBScript), if I try to create a large 2-dimensinal array, I get an "Out of Memory" error. For example, this
DIM xxx : xxx = 10000
DIM yyy : yyy = 10000
REDIM aaa(xxx, yyy)
Response.End
yeilds this
Microsoft VBScript runtime error '800a0007'
Out of memory
Is their another data structure I can use that will work, or some other workaround?
(2010-01-27) UPDATE: Upon further investigation of this legacy code I'm working on, the array is sparse. In other words, only a portion of the array place holders are needed. Like this:
aaa(0, 0) = 1.23
aaa(101,12) = 1.57
aaa(3020,1200) = 2.58
etc.
I thought about changing things to store the values like this:
aaa(count) = "xxx,yyy,val"
and then using Split() to get val given x and y, but that requires a time-consuming loop through the array each time I know x and y. Is there a better solution?