[fpc-pascal] static class methods
Jonathan Benedicto
contact at jomitech.com
Wed Feb 6 23:19:30 CET 2008
Micha Nelissen:
> What are "static" class methods?
>From RAD Studio 2007's Help file on Methods
(ms-help://borland.bds5/devcommon/methods_xml.html):
Like class methods, class static methods can be accessed without an object
reference. Unlike ordinary class methods, class static methods have no Self
parameter at all. They also cannot access any instance members. (They still
have access to class fields, class properties, and class methods.) Also
unlike class methods, class static methods cannot be declared virtual.
Methods are made class static by appending the word static to their
declaration.
> "Plain" class methods are allowed to be virtual, surely.
Yes, "plain" class methods can be virtual, and can be overridden.
Jon
More information about the fpc-pascal
mailing list