[Lazarus] TMask revisited

Sven Barth pascaldragon at googlemail.com
Fri Oct 15 14:10:09 CEST 2021

Juha Manninen via lazarus <lazarus at lists.lazarus-ide.org> 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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20211015/dd2e2b37/attachment.html>

More information about the lazarus mailing list