Juha Manninen via lazarus <[email protected]> schrieb am Fr.,
15. Okt. 2021, 14:03:
> This may be a dummy question but what does "static" do for a class
> procedure?
> José's mask code has for example:
>
> class procedure Exception_IncompleteMask(); static;
>
> I thought class procedures are kind of static anyways, meaning they don't
> have a Self pointer.
>
Non-static class methods *do* have a Self parameter, but it's the class
type and not the class instance. They can also be virtual, which is a
really great feature of the Object Pascal language (I often miss that at
work where I use C++). They are also assignment compatible to method
variables ("of object").
Static methods on the other hand don't have a Self parameter, can't be
virtual and are assignment compatible to normal procedure variables.
Regards,
Sven
>
--
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus