> Dear Developers of Gambas, > > we are really interested in Gambas and we will use it to create a > connection between a plc and a computer. > > Therefore we will use the shared library "libnodave". > > Unfortunately "libnodave" needs some function calls by reference. > > > > How is it able to call a function by reference? > > > > The following way does not work: > > > > Public sub read_from_plc() > > dim ph as long, di as long, dc as long, res as long > > res = initialize(BYREF ph, BYREF di, BYREF dc) > > ... > > End sub > > FUNCTION initialize (ph as long, di as long, dc as long) as long > > ... > > End function > > You can find this description: > http://gambasdoc.org/help/lang/methoddecl?view
As explained in that web page, you must specify ByRef both in the function call *and* in the function declaration. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user