I know I can do this for single dimensional arrays as a shortcut:
But is this correct for multidimensional arrays:
The reason I ask is because in in the source code for Bob's Bad Day (included as a sample program), there's what appears to be a 2 dimensional definition, but with too many elements:
Can someone explain what's happening here?
Thanks,
Russell
Global arr:Int[] = [22,38,4,5,77] ' Very handy
But is this correct for multidimensional arrays:
' Two dimensional array Global arr:Int[][] = [[2,3],[3,5]]
The reason I ask is because in in the source code for Bob's Bad Day (included as a sample program), there's what appears to be a 2 dimensional definition, but with too many elements:
Global myMap[][] = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,0,1,0,0,0,1,0,0,0,0,0,0,0,1],[1,0,1,0,1,1,1,0,1,1,1,0,1,1,1],[1,0,1,0,0,0,0,0,0,0,1,0,0,0,1],[1,0,0,0,1,1,1,1,1,1,1,1,1,0,1],[1,1,1,0,0,0,0,1,0,0,0,0,0,0,1],[1,0,0,0,1,1,0,1,0,1,1,1,1,0,1],[1,0,1,1,1,1,0,1,0,0,0,0,1,1,1],[1,0,1,0,0,0,0,0,0,1,1,0,0,0,1],[1,0,1,1,1,1,0,1,1,1,1,1,1,0,1],[1,0,0,0,0,1,0,0,0,0,0,0,0,0,1],[1,1,1,1,0,1,0,1,1,1,1,0,1,0,1],[1,0,0,0,0,1,0,0,0,0,1,0,1,0,1],[1,0,1,1,1,1,0,1,1,1,1,0,1,0,1],[1,0,0,0,0,0,0,0,0,0,1,0,1,0,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]
Can someone explain what's happening here?
Thanks,
Russell