title: Parameter Passing an Array of Type in Delphi
body: <p>I'm trying to pass an array out of a class into my main program in Delphi. I'm having a bit of trouble with the data types and an hour scouring the web has found nothing to help me. It sounds a bit strange, but the more complex the answer the better (it's for a college project).</p>
  
  <p>I have a class connected to SQL which reads an SQL Query into an array of a record Type declarations (sorry if it's a bit messy at the moment) :</p>
  
  <pre><code>Type TScout = Record
  SNum, FName, SName, Gender, Address, HomeNum, MobNum,
  SEmail, STel, Hikes, Nights, Med, Diet : String;
  DoB, DoJ : String;
  End;
  
  Type TScoutArray = Array of TScout;
  
  Type TScoutSQL = Class
  Public
    Procedure InitSQL;
    Procedure GetRecords;
    Function SendRecords : TScoutArray;
  Private
    ScoutsArray : TScoutArray;
    ScoutConnection : TSQLConnection;
    ScoutQuery : TSQLQuery;
  End;
  </code></pre>
  
  <p>So the whole "Function SendRecords : TScoutArray;" isn't working, as on the other side I have the same 2 types (TScout and TScoutArray) declared exactly the same, I call the function:</p>
  
  <pre><code>  ScoutArray := ScoutSQL.SendRecords;
  </code></pre>
  
  <p>And I get:</p>
  
  <pre><code>[Error] MembersUnit.pas(51): Incompatible types
  </code></pre>
  
  <p>Can anyone help?</p>