2017-02-07 14:35 GMT+01:00 Mattias Gaertner <nc-gaert...@netcologne.de>:
> > I never understood Object Pascal's class methods/properties either? > > Unlike Java, not everything needs to be in a class. We are allowed to > > have procedures or functions, and global ones at that. So in Object > > Pascal we could simply have a unit called FooStuff where everything > > related to Foo is defined, then have a global function F() and then use > > it as follows... > > Class methods can be overridden. not static. btw. class property is not my idea :P. Don't forget that you can use property as array and is possible to use index keyword. type TFoo = class class function F(i: integer): byte; static; class property P1: byte index 10 read F; class property P2[idx: integer]: byte read F; end; -- Best regards, Maciej Izak
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal