I've been using that "array of an array" system for quite a while now for whenever I need to add additional dimension(s) to any empty arrays. But lately I've been taking note of that array example in the manual that seems way simpler and less tedious than the "array of an array" method. Though I never managed to get it to work on anything else than one-dimensional arrays since I started with BlitzMax so I asume it's a miss-leading information.
Well, to save you guys the work from looking it up in the manual yourself let me quote it:
So is this a long-forgetten bug, limitation or something that should been corrected in the manual (adding a proper explanation of the use of "array of an array" in the process)?
It's a real shame you can't create multi-dimensional arrays that way though... For whenever you need to create a fresh, but simple multi-dimensional array that doesn't really require slicing.
Well, just felt like ranting about it, lol. Love BlitzMax otherwise. x3
Well, to save you guys the work from looking it up in the manual yourself let me quote it:
Arrays may also be created 'on the fly' using the syntax:
New [ Dimension1 , Dimension2 etc... ]
This returns an array of the specified dimension(s) with each element initialized to Null. For example:
Well, based on that one would assume this would work too:New [ Dimension1 , Dimension2 etc... ]
This returns an array of the specified dimension(s) with each element initialized to Null. For example:
Local int_array:Int[] int_array=New Int[10]
int_array=New Int[10,10]But it doesn't; or have I missed something?
So is this a long-forgetten bug, limitation or something that should been corrected in the manual (adding a proper explanation of the use of "array of an array" in the process)?
It's a real shame you can't create multi-dimensional arrays that way though... For whenever you need to create a fresh, but simple multi-dimensional array that doesn't really require slicing.
Well, just felt like ranting about it, lol. Love BlitzMax otherwise. x3