Ryan Joseph <generic...@gmail.com> schrieb am Mo., 10. Juni 2019, 20:31:
> > > > On Jun 10, 2019, at 2:26 PM, Sven Barth via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > > > > Also FPC doesn’t have something “self” but for the class level so you > need to cast the return value. Btw adding “ClassSelf” is something I’ve > wanted for a while, so I can reference the class type within the class > declaration. > > > > What are you talking about here? > > > > Like this. I would prefer there being a “ClassSelf” type or something > which acted as TSelf. > > type > TRecord = record > public type > TSelf = TRecord; > public > class operator + (left: TSelf; right: integer): > TSelf; > class operator + (left: TSelf; right: integer): > TSelf; > class operator - (left: TSelf; right: integer): > TSelf; > class operator * (left: TSelf; right: integer): > TSelf; > class operator / (left: TSelf; right: integer): > TSelf; > class operator ** (left: TSelf; right: integer): > TSelf; > class operator div (left: TSelf; right: integer): > TSelf; > class operator mod (left: TSelf; right: integer): > TSelf; > Ehm... You are aware that you can simply use TRecord here? Regards, Sven >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel