title: Named/optional parameters in Delphi?
body: <p>In one of the Delphi demo applications, I've stumbled upon some syntax that I didn't know the Delphi compiler accepted:</p>
  
  <pre><code>// ......\Demos\DelphiWin32\VCLWin32\ActiveX\OleAuto\SrvComp\Word\    
  // Main.pas, line 109
  
  Docs.Add(NewTemplate := True); // note the assignment
  </code></pre>
  
  <p>I can't seem to reproduce this type of parameter passing in my own code, and I never see anyone use it. So these are my questions:</p>
  
  <ul>
  <li><p>Can i use this in "normal" methods and is it part of "the Delphi Language", or is this some compiler hack for automation objects? </p></li>
  <li><p>What's needed in order to be able to use this?</p></li>
  <li><p>Is this anything like C#4's named and optional parameters?</p></li>
  </ul>
  
  <hr>
  
  <blockquote>
    <p>Additional information: I usually pass
    records or simple classes when there
    are many optional parameters to
    methods, but it looks like I wouldn't
    need that with this syntax.  I'm aware
    of default parameter values, but their
    usefulness is limited because you
    cannot provide any parameters to the
    right of an omitted one. In JavaScript
    I'm using this named parameter style
    all the time (be it with different
    syntax), and it's powerful.</p>
  </blockquote>