[fpc-devel] Class property and virtual getter

Sven Barth pascaldragon at googlemail.com
Fri Feb 28 09:21:18 CET 2014


Am 28.02.2014 09:12 schrieb "Michael Schnell" <mschnell at lumino.de>:
>
> On 02/28/2014 02:18 AM, Hans-Peter Diettrich wrote:
>>
>>
>> So the lack of "Self" seems to apply to "static;" methods, not to
"class" methods. I'll ask in an EMBT group for a description of "static;",
the OH seems to reflect the C++ meaning only,
>
>
> In ANSI C "static" with functions just means "unreachable from outside
the current source file" (i.e. by the linker) (I always thought this is a
silly name for that meaning.)
>
> Is this different with C++ ?

In C++ classes you can have static methods that work like static class
methods in FPC/Delphi (no "this", need to be called with
TypeName::MethodName, can be used for function pointers).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140228/d018384a/attachment.html>


More information about the fpc-devel mailing list