<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>Thanks everyone! I'm still learning some parts of Pascal!  I'll see if I can accommodate for that.<br>
<div><br>
</div><div>Gareth aka. Kit<br>
</div> <br>
<br>
<span style="font-weight: bold;">On Sun 29/07/18 08:14 , Sven Barth via fpc-devel fpc-devel@lists.freepascal.org sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT:0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"><div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Thorsten Engler <<a href="mailto:thorsten.engler@gmx.net">thorsten.engler@gmx.net</a>> schrieb am So., 29. Juli 2018, 04:40:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7228884354063962289m_-7085890439184589223WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">
type<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  TMyClass = class of TMyObject;<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  TMyObject = class<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">    procedure InstanceMethod; //Self = TMyObject, can be virtual<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span>
</p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">    class procedure ClassMethod; //Self = TMyClass, can be virtual<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">    class procedure StaticClassMethod; static; //no Self, really just a global procedure in a scoped namespace<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">
  end;<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"=""><span style="text-decoration: underline;"></span> <span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">var<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  o: TMyObject;<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">
  c: TMyClass;<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">begin<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  o.InstanceMethod; //if virtual, calls resolved based on actual class<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  o.ClassMethod; //if virtual calls, resolved based on actual class<span style="text-decoration: underline;">
</span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  o.StaticCalssMethod; //can’t be virtual, resolved on variable type<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"=""><span style="text-decoration: underline;"></span> <span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  TMyObject.ClassMethod; //call resolved based on given type<span style="text-decoration: underline;"></span><span style="text-decoration: underline;">
</span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  TMyObject.StaticClassMethod; //call resolved based on given type<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"=""><span style="text-decoration: underline;"></span> <span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  c.ClassMethod; //if virtual, calls resolved based on actual class<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span>
</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  //haven’t tried if this one works, I assume it does:<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">  c.StaticClassMethod; //can’t be virtual, resolved on variable type<span style="text-decoration: underline;"></span><span style="text-decoration: underline;"></span></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:" calibri",sans-serif"="">end;</span></p></div></div>
</blockquote></div></div><div dir="auto">@Gareth: And I mean the StaticClassMethod here. </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> 
 

_______________________________________________<br>

fpc-devel maillist  -  <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br>

<a target="_blank" href="<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a><br>

<br>

</blockquote></HTML>