title: How do you pass an array by reference in Delphi?
body: <p>I already read up about passing by reference and so</p>
  
  <pre><code>procedure test(var x:integer);
  begin
    x:=x+5;
  end;
  </code></pre>
  
  <p>so the above code updates 5 by reference. I assumed if I was updating an array by reference I could declare <i>var X: array of blah</i>... having some bound bugs and just wanted to know if I should be using the type of data for the pointer to the data or if the pointer is always int... just so I know if it's how I'm doing my passing by reference or something else in my code that is the issue. </p>