[Gambas-user] Maybe another bug.

Benoît Minisini gambas at ...1...
Sun Mar 3 16:31:27 CET 2013


Le 03/03/2013 16:07, Jussi Lahtinen a écrit :
> Ah, of course... and so it was totally unrelated to using executable as
> library.
> Thanks for clearing this up!
> I'll just use Byref and all works as intended.
>
> Maybe there should be some kind of warning about that in documentation,
> since it's not necessarily obvious that automatic conversion changes also
> reference? Not sure.
> Compiler (or runtime) warning would be great, but I don't see any way to
> tell whether array is passed only as argument,
> and when something is expected to come back with the array. So I don't
> think it's possible...
>
> Jussi

If you pass an object of class A to a function argument that expects an 
object of class B, expect an error of an automatic conversion to a new 
object.

There won't be any warnings for automatic conversions, this is a 
convention of the Gambas language. You must know what you are doing with 
datatypes!

Regards,

-- 
Benoît Minisini




More information about the User mailing list