Spin has one dimensional arrays. You have to implement higher dimensions by yourself. For example, a 3 x 3 matrix is declared as an array of 9 elements. To access the i'th/j'th element, you'd use "i*3+j" as a subscript.
You'd have to loop through the array to do an assignment. There's no "syntactic sugar" for matrices.
Couldn't you use bytefill / wordfill to initialize the array? I read that it is much more efficient then looping through the array since the interpreter handles it internally.
For example, I use a 2d array by using the same method as Mike proposed. To init the array with all zeros, I do a bytefill(@buffarray, 0, BUFFLEN). BUFFLEN being the size of the array, and 0 being the value to fill with.
Comments
You'd have to loop through the array to do an assignment. There's no "syntactic sugar" for matrices.
For example, I use a 2d array by using the same method as Mike proposed. To init the array with all zeros, I do a bytefill(@buffarray, 0, BUFFLEN). BUFFLEN being the size of the array, and 0 being the value to fill with.