Re: [fpc-pascal] static class methods

2008-02-07 Thread Jonas Maebe
On 07 Feb 2008, at 10:56, Peter Vreman wrote: Disabling self is not possible. It is required and also used in our RTL: class function TObject.InstanceSize : SizeInt; begin InstanceSize:=pSizeInt(pointer(self)+vmtInstanceSize)^; end; Instance size is a regular c

Re: [fpc-pascal] static class methods

2008-02-07 Thread Peter Vreman
> > 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 stati

Re: [fpc-pascal] static class methods

2008-02-07 Thread Jonas Maebe
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 ha

Re: [fpc-pascal] static class methods

2008-02-06 Thread Jonathan Benedicto
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

Re: [fpc-pascal] static class methods

2008-02-06 Thread Micha Nelissen
Jonathan Benedicto wrote: > Jonas Maebe wrote: >> I'm not sure how Delphi could handle this without passing the VMT as >> invisible parameter (and from a cursory look at the code generated by >> Kylix, it does appear to pass the VMT). > > Delphi doesn't allow static class methods to be virtual.

Re: [fpc-pascal] static class methods

2008-02-06 Thread Jonathan Benedicto
Jonas Maebe wrote: I'm not sure how Delphi could handle this without passing the VMT as invisible parameter (and from a cursory look at the code generated by Kylix, it does appear to pass the VMT). Delphi doesn't allow static class methods to be virtual. Jon

Re: [fpc-pascal] static class methods

2008-02-06 Thread Jonas Maebe
On 06 Feb 2008, at 20:52, Jonathan Benedicto wrote: Why do static class methods in FPC have a "Self" parameter? In Delphi, static class methods do not have a Self parameter. You need them to correctly handle cases like this: *** {$ifdef fpc} {$mode delphi} {$endif} type tc = class c

[fpc-pascal] static class methods

2008-02-06 Thread Jonathan Benedicto
Why do static class methods in FPC have a "Self" parameter? In Delphi, static class methods do not have a Self parameter. Jon ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal