[fpc-pascal] class operator in record

Sven Barth pascaldragon at googlemail.com
Wed Mar 1 11:17:12 CET 2017


Am 01.03.2017 03:39 schrieb <noreply at z505.com>:
>
> How come:
>
>   class operator Initialize(var aFoo: TFoo);
>   class operator Finalize(var aFoo: TFoo);
>
> in a record are called class operator..
>
> why not "record operator"?
>
> Are these advanced neo-records considered classes?

It's simply that Delphi introduced static methods to records using the same
syntax as for classes and operators followed along.

We've simply followed that along as we would have needed to do so at least
for mode Delphi anyway and the implementor of advanced records decided not
to deviate from that.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170301/2311f134/attachment.html>


More information about the fpc-pascal mailing list