<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Juha Manninen via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> schrieb am Fr., 15. Okt. 2021, 14:03:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>This may be a dummy question but what does "static" do for a class procedure?</div><div>José's mask code has for example:</div><div><br></div><div> class procedure Exception_IncompleteMask(); static;</div><div><br></div><div>I thought class procedures are kind of static anyways, meaning they don't have a Self pointer.</div></div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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"). </div><div dir="auto"><br></div><div dir="auto">Static methods on the other hand don't have a Self parameter, can't be virtual and are assignment compatible to normal procedure variables. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>