title: Delphi Passing Dynamic array of Records to function
body: <p>I have a Dynamc array of Records and I wish to pass one of the items in the array to a function by reference </p>
  
  <p>So for example one of the array items -  AArray[1].arecorditem is a string of 6 characters String[6]</p>
  
  <p>the function would be  - </p>
  
  <pre><code>function dosomething(var AStringVal:string):Integer;
  </code></pre>
  
  <p>So I would execute</p>
  
  <pre><code>Aresult:= dosomething(AArray[1].arecorditem);
  </code></pre>
  
  <p>however when I try to compile I get the Error Type of actual and formal var parameters must be identical.</p>
  
  <p>Is this possible to do or should I assign the array item to a string and then pass the string to the function.</p>
  
  <p>Thanks</p>
  
  <p>Colin</p>