Array pointer function passing

BlitzMax Forums/BlitzMax Programming/Array pointer function passing

plash(Posted 2008) [#1]
If I use this:
Local a:Object[4, 2]

func(a)

Function func(b:Object[,])
End Function


The array should be passed as a pointer (instead of copying it), correct?

Also, is there a way to extract (using splicing) a section of a 2d array?


grable(Posted 2008) [#2]
The array should be passed as a pointer (instead of copying it)

Yes, an array is always passed by reference.

is there a way to extract (using splicing) a section of a 2d array?

Splicing only works on 1D arrays, so you have to do it manually.


Yan(Posted 2008) [#3]
This is worth bearing in mind.