LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

How do I use ARYOP on a multi-dimensional array?

Root / Programming Questions / [.]

_xdbcCreated:
I tried
array[q]
(ignoring the second index) but it doesn't work

You can only use ARYOP on an entire array at once. Multi dimensional arrays in SB aren't arrays of arrays like they are in some languages. If you want to operate on just one "row", you'll have to COPY the part you want into a temporary array:
DIM ARRAY[H,W]
DIM TEMP[W]
COPY TEMP,ARRAY,q*W,W 'copy ARRAY[q] -> TEMP
ARYOP ... TEMP ...
COPY ARRAY,q*W,TEMP' copy TEMP -> ARRAY[q]