Resizing 2d Arrays

BlitzMax Forums/BlitzMax Beginners Area/Resizing 2d Arrays

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

No, you can't the only possible way would be the use of Arrays in arrays.
Here a sample:

Local Test:Int[][]
Test = Test[..200]

For Local I = 0 To 199
   Test[I] = Test[I][..200]
Next


For Local x = 0 To 199
   For Local y  = 0 To 199
      Test[x][y] = Rand(0,200)
   Next
Next


'Resizing

Test = Test[..20]

For  I = 0 To 19
   Test[I] = Test[I][..20]
Next

For X = 0 To 19
   For  Y = 0 To 19
      Print "Array : " + x + " : " + y + " = " +Test[x][y]
   Next
Next