[fpc-pascal] Operators for a class

Gabor Boros mlnglsts at bgss.hu
Thu Dec 31 17:26:50 CET 2020


Hi All,

I try to convert some C++ source to FPC, see below a short example from 
it. How can I define same operator with FPC trunk?

class Cla
{
     INT64   Num;

public:
     Cla operator +(const Cla& m)
     {
         Cla  ret(this);

         ret.Num += m.Num;

         return ret;
     }

Gabor


More information about the fpc-pascal mailing list