how to pass array to function

BlitzMax Forums/BlitzMax Programming/how to pass array to function

Easy, arrays are essentially objects, so they can be passed in a similar way:


Local grid[,]=New Int[10,10]

Function modifyGrid(grid[,])
   'Code Here
End Function



The one thing you do have to be careful of is that the number of dimensions in the array matches the number of dimensions specified in the function's definition.