pass an array to function

Blitz3D Forums/Blitz3D Beginners Area/pass an array to function

Hi

Quick question. Is there an easy way to pass a non-global array to a function, e.g.

dim b$(100,100)

myfunction(b$)
end

function myfunction(b$)
stuff
end function

which doesn't work.

Thanks

Arrays are global, you don't need to pass them.

Took the words right out of my mouth.

ta, thanks for the quick reply

You can pass 'blitz' arrays tho:

Local b$[4] ; has to be one dimensional

b[1] = 20
myfunction(b)

End

Function myfunction(c$[4])
;stuff
End Function

More info here:
http://www.blitzcoder.com/cgi-bin/code/code_showentry.pl?id=thechange09052002191420&comments=no