how to pass array to function
BlitzMax Forums/BlitzMax Programming/how to pass array to function
| ||
I have an array: grid[x,y] how can I pass this to a function as a parameter? ps. Fantastic work on BlitzMax Mark!! |
| ||
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. |
| ||
Thanks very much! |