title: pass two difference arrays for same array
body: <p>I was trying to use same printing procedure for two types of arrays(1st arry length was 10, 2nd array length was 15).</p>
  
  <p>I could not find any solution over internet. Did any one have any solution for this problem.</p>
  
  <p>this is the Two arrays</p>
  
  <pre><code>program pp1;
  const 
    m=10;
    n=15;
  type
    matrix1=array[1..m] of integer;
    matrix2=array[1..n] of integer;
  var
  m1:matrix1;
  m2:matrix2;
  </code></pre>
  
  <p>this is the method which it tried. in method 'x' mens the length of the array.</p>
  
  <pre><code>procedure writeMatrix(var data: array of integer ;x:integer);
  var
    j:integer;
  begin
     for j:=1 to x do
     begin
       write(data[j]:3);
     end;
  
  end;
  </code></pre>
  
  <p>my main method</p>
  
  <pre><code>    begin
      writeMatrix(m1,10);
      writeMatrix(m2,10);
      end.
  </code></pre>
  
  <p>How can i use the same this writeMatrix method to print both of the arrays.. Is there any stranded way to do it.</p>