Functions

BlitzMax Forums/BlitzMax Beginners Area/Functions

Yes.

Local x:Int=10

ChangeX(x)

Print x

Function ChangeX(x:int var)

x=5

End Function


Adding var to the variable type in the function prototype ( as I've done in the code above ) passes it by reference instead of by value.