I forgot to mention about related bug... IDE doesn't like this;
With someobject TestFunction(ByRef .x) End With it renders to; With someobject TestFunction(ByRef.x) <-- Unknown identifier: ByRef End With Sorry about messy post... Jussi ---------- Forwarded message ---------- From: Jussi Lahtinen <jussi.lahti...@gmail.com> Date: Wed, Feb 25, 2009 at 9:41 PM Subject: Gambas3 byref behavior To: "Gambas mailing list for users." <Gambas-user@lists.sourceforge.net> 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 a) Print a Public Function TestFunction(Byref x as Integer) Inc x End Result: 0 There are reasons why one design function to take parameters byref, and so, it should be default behavior. Need to pass byref argument byval is rare exception (I think). Maybe there are some technical restrictions why this is as it is. And maybe this is not good enough reason to change syntax anymore... What do you think? Jussi ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user