@Turoid,
Call me a naysayer, but I'm not sure that I see anything great about your solution, or why it even works
1. If the first dimension can change, then if the second row of the 2-D array has less items in it that the first row, you'll lose most data in the first row if not careful. (I suspect he has NOT used this method).
dim MyData(3, 0)
AddToRow(1, 9)
AddToRow(1, 99)
AddToRow(1, 999)
AddToRow(2, 8)
AddToRow(2, 88)
for i = 1 to MyData(1, 0)
print MyData(1, i)
next
wait key
end
function AddToRow(Row as integer, Value as integer)
inc MyData(Row, 0)
Dim MyData(Row, MyData(Row, 0) )
MyData(Row, MyData(Row, 0)) = Value
endfunction
2. If you're simply using it as a 1-D array (ie, the first dimension never changes size), then you may as well use a 1-D array rather than have the extra dimension and double the memory usage. (It doesn't sound like he's done that either).
Either you've not explained the whole solution, or your code is working by coincidence (at least as far as I can see).