redimming a 2D object array
BlitzMax Forums/BlitzMax Beginners Area/redimming a 2D object array
| ||
can anyone help me out with the syntax for this? thx in advance :) |
| ||
Look in the help for slices... This flexibility allows you to use slices to resize or copy arrays. For example: Local a[200] 'initialize a[] to 200 elements a=a[50..150] 'extract middle 100 elements of a[] a=a[..50] 'extract first 50 elements of a[] a=a[25..] 'extract elements starting from index 25 of a[] a=a[..] 'copy all elements of a[] a=a[..200] 'resize a[] to 200 elements |
| ||
you can't slice multi-dimensional arrays. But you can use a jagged array instead. |
| ||
You can't do it for a 2D array. You need to copy to a new, larger array. |