Re: [Gambas-user] Gambas3 byref behavior

2009-02-26 Thread BenoƮt Minisini
> Hi > I could be wrong, but. > I think that byref command should behave like this: > > a = 0 > TestFunction(a) > Print a > > Public Function TestFunction(Byref x as Integer) > Inc x > End > > Result: > 1 > > > And if you like to pass byref argument byval instead for some reason, > you should do t

[Gambas-user] Gambas3 byref behavior

2009-02-25 Thread Jussi Lahtinen
Hi I could be wrong, but. I think that byref command should behave like this: a = 0 TestFunction(a) Print a Public Function TestFunction(Byref x as Integer) Inc x End Result: 1 And if you like to pass byref argument byval instead for some reason, you should do this: a = 0 TestFunction(Byval