Resizing 2d Arrays
BlitzMax Forums/BlitzMax Beginners Area/Resizing 2d Arrays| 
 | ||
| Hi, I know you can resize 1D arrays but is it possible to resize 2d arrays? If so can someone post an example? Thanks | 
| 
 | ||
| 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 
 | 
| 
 | ||
| ok thanks for the info | 
| 
 | ||
| oops |