<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Il 03/05/23 16:44, Steve Litt via
      fpc-pascal ha scritto:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20230503104404.4778b22c@mydesk.domain.cxm">
      <pre class="moz-quote-pre" wrap="">José Mejuto via fpc-pascal said on Wed, 3 May 2023 11:35:50 +0200

</pre>
      <blockquote type="cite" style="color: #007cff;">
        <pre class="moz-quote-pre" wrap="">Hello,

Attached is a dirty implementation of "touch" for junctions
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">==========================================================
TTouchJunction = class(TCustomApplication)
  protected
    procedure DoRun; override;
    function DateTimeToFileTime(DateTime: TDateTime): TFileTime;
  public
    constructor Create(TheOwner: TComponent); override;
    destructor Destroy; override;
    procedure WriteHelp; virtual;
  end;
==========================================================

I'm an old Turbo Pascal (mainly 3.x, a little 5.5) guy and don't
remember or never saw override and virtual. What do they do?

SteveT
</pre>
    </blockquote>
    <ul>
      <li>
        <p>Override: When you're dealing with objects, you have the
          inheritance, that is you may derive a new class (the template
          of an object) from an existing class and the newly created
          class inherits all the methods and properties of the parent
          class. In this case TTouchJunction is declared as a descendant
          of TCustomApplication, therefore it inherits all the methods
          and properties. If you need that your object does something
          different from the methods of its parent, but keep the same
          name, you must declare that your declaration overrides the
          ancestors one. If in the body of your new method if you want
          to execute also the ancestor method you may call it with the
          keyword "inherited".</p>
      </li>
      <li>
        <p>Virtual: means that this method can be overridden by a
          descendant class. The same does the keyword Dynamic.  The
          difference has to do with the way the code is allocated in
          memory. Virtual is optimized for speed, Dynamic for memory.<br>
        </p>
      </li>
    </ul>
    <p>Hope that it helps.<br>
    </p>
    <p>Giuliano</p>
    <p><br>
    </p>
  </body>
</html>