multidimensional arrays...

BlitzMax Forums/BlitzMax Programming/multidimensional arrays...

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

You can also do it like this:
Local arr:Int[][] = [[1,2,3], [4,5]]

arr[1] = arr[1][..(arr[1].length + 1)] ' Add a new element to the second index (subarray)

arr[1][2] = 6


This way you don't have to worry about the number of indexes inside the subarray (second index).
This really is some sort of "add new element" method.