> Hi! > Quick thought; it would be nice to have compiler warning if "byref" is > missing from function/sub call. > I know using byref is optional, but so far I have only forgot to add it. > > Example: > > Private Sub Test(Byref x As Integer) > ... > > And you can call it; > Test(i) > Or; > Test(Byref i) > > > Jussi
By having to specify ByRef in the caller, you can't forget that the function will modify your variable (forgetting that leads to hard-to-fix bugs) and it help readers of your code. I added ByRef to Gambas only to help porting VB projects. In other cases, just don't use it, even if you find it more practical. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user