[fpc-pascal] class property accessor static
hnb.code at gmail.com
Tue Feb 7 14:40:12 CET 2017
2017-02-07 14:35 GMT+01:00 Mattias Gaertner <nc-gaertnma at 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
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;
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal