[Gambas-user] To wish list; optional compiler warning

Benoît Minisini gambas at ...1...
Sun Sep 11 17:37:51 CEST 2011


> Problem is that my functions are like; ConnectThese(iWithTerm, ByRef
> iVariable1, Byref iVariable2).
> 
> Jussi
> 

You are right with the fact that the compiler should issue a warning. But it 
cannot know everytime that the called function needs a ByRef, as soon as the 
function is in another class. Maybe I should have allowed ByRef in private 
functions only...

Now about using ByRef to return more than one value: I usually return an 
array. But I admit it is less practical. You can return a structure too, or a 
class used like a structure (with public variables only).

Regards,

-- 
Benoît Minisini




More information about the User mailing list