|
-
Jul 14th, 2002, 06:24 PM
#1
Thread Starter
Lively Member
converting multidimensional arrays
ok, now that i have my question about defining multidimensional arrays, how do i convert them. i really just want to know how to convert a 3d array into 2d, as well as a 2d array into a 1d. (im not going to bother converting 3d to 1d, b/c that would be too long of an array when i would rather deal with it in 2d)
example
2d to 1d
visual basic code:--------------------------------------------------------------------------------
dim MyArray(2,2)
dim MyOneDArray(8)
MyOneDArray(0) = MyArray(0,0)
MyOneDArray(1) = MyArray(1,0)
MyOneDArray(2) = MyArray(2,0)
MyOneDArray(3) = MyArray(0,1)
MyOneDArray(4) = MyArray(1,1)
MyOneDArray(5) = MyArray(2,1)
MyOneDArray(6) = MyArray(0,2)
MyOneDArray(7) = MyArray(1,2)
MyOneDArray(0) = MyArray(2,2)
--------------------------------------------------------------------------------
but, ya know, i want to work with a much larger array conversion, and id dont want to have to type all that out...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|