Multidimensional Array
Posted by Gary on November 09, 2001 11:17 AM
I've got a sub (called "Turn") written to manipulate a single-dimensional array. Calling the sub is simply a matter of passing the array over to the sub. For example, if my array is called "Numbers", all I have to do is call it with a line that says:
Turn(Numbers)
So far, so good. The problem now is that I've got a 2-dimensional array, and I want to run it through the sub, 1 dimension at a time. For example, if the array is dimensioned as "Dim Numbers(1 to 3,1 to 25) as single", I then want to treat it as 3 one-dimensional arrays, each of which I want to run through my sub.
I thought that the following code would work:
For i=1 to 3
turn (Numbers(1,))
next i
Of course, it doesn't work -- apparently there's something wrong with my syntax. I've tried various alternatives, without luck.
Any help would be greatly appreciated. Thanks!