[fpc-pascal] static class methods

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Feb 7 10:31:41 CET 2008

On 06 Feb 2008, at 23:19, Jonathan Benedicto wrote:

>> 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.

In that case the reason that FPC passes a self pointer is probably  
simply because no special support was ever added for static class  
methods (static is parsed for class methods, but I guess nothing is  
done with it afterwards). Feel free to submit a bug report.


More information about the fpc-pascal mailing list