title: Pass record parameter without declaring it first as a variable
body: <p>If I am trying to call a procedure which has a record type (not object) as a parameter, is it possible to somehow pass details of that parameter "inline" without having to declare a variable of that type first?</p>
  
  <p>eg assume I have this simple record type:</p>
  
  <pre><code>type TMyRecord = record
    AString: string;
    AnInt: Integer;
  end;
  </code></pre>
  
  <p>and this procedure declaration:</p>
  
  <pre><code>procedure MyProcedure(Rec: TMyRecord);
  </code></pre>
  
  <p>If I want to call MyProcedure do I have to declare a variable of type TMyRecord or can I do something like:</p>
  
  <pre><code>MyProcedure(TMyRecord("Test", 10));
  </code></pre>
  
  <p>That doesn't work (XE2) (get a compiler error about it expecting a ")").</p>
  
  <p>So, can I do something like that?  Or not possible.</p>
  
  <p>Thanks</p>