In my prgm, one function has an array passed in as a parameter. Is there anyway to find out the dimensions of the array without having extra variables? Such as ArrayWidth(m:Int[]) or ArrayHeight(m:Int[]). Is this possible?
array dimensions
BlitzMax Forums/BlitzMax Programming/array dimensions len(myArray[])
or I believe you can do:
myArray.Length
*EDIT*
if you are using the arrays within arrays trick then you can get both width and height with this.
or I believe you can do:
myArray.Length
*EDIT*
if you are using the arrays within arrays trick then you can get both width and height with this.
Maybe a silly question but I'm new here :) No multidimensional arrays? Ok, so I know I can use a one dimensional array and some simple arithmetic, or even a list. Sometimes, though, you just can't beat map[x][y] :)
Am I missing something?
Am I missing something?
There are multi-dimensional arrays.
From the Wiki...
http://www.peppermedia.net/blitzwiki/index.php/Arrays#Multi-Dimensional_Arrays
From the Wiki...
http://www.peppermedia.net/blitzwiki/index.php/Arrays#Multi-Dimensional_Arrays
Ngggggg
Thanks for that :)
Thanks for that :)
Undocumented:
Local a:Int[2,2,2]
Print a.numberOfDimensions 'Prints 3
Local a:Int[2,2,2]
Print a.numberOfDimensions 'Prints 3