title: array append in delphi
body: <p>I'm trying to implement array append in Delphi 7, because the standard library does not have it. This is what I have so far, but it complains about incompatible types when I try to get the length of the array.</p>
  
  <pre><code>procedure ArrayAppend(var GenericArray; const Element);
  var
    len: Integer;
  begin
    len := Length(GenericArray);
    SetLength(GenericArray, len+1);
    GenericArray[len] := Element;
  end;
  </code></pre>
  
  <p>I'm trying to find what the most generic type of array is in Delphi 7. </p>
  
  <p>I also have no issue returning the modified array if that's the only way to do it.</p>