[Gambas-user] Arithmetic with objects?

Benoît Minisini g4mba5 at gmail.com
Thu Feb 25 01:13:17 CET 2021


Le 24/02/2021 à 22:57, Jussi Lahtinen a écrit :
> Example points can be added, point(1,0) + point(0,1) = point(1,1).
> But is there way to implement this for your own classes?
> 
> Jussi
> 

Not in Gambas. But in a component written in C you can implement support 
for arithmetic operators on it (look at the 'gb.gsl' or 'gb.gmp' component).

Regards,

-- 
Benoît Minisini


More information about the User mailing list