title: Randomize array?
body: <p>In pascal, i want to randomly organize an array.  Therefore the majority of the time the array should be organized differently.</p>
  
  <p>Consider this array setup</p>
  
  <pre><code>const
    ARRAY_ELEMENTS = 3;
  
  SetLength(iIndex, ARRAY_ELEMENTS);
  
  for i := Low(iIndex) to High(iIndex) do
  begin
     case i of
     0: iIndex[i] := 0;
     1: iIndex[i] := 1;
     2: iIndex[i] := 2;
     end;
  end; 
  </code></pre>
  
  <p>How is it possible for the <code>iIndex[]</code> that contains the value 0 not to always be in the first element of the array and for the <code>iIndex[]</code> that contains value 2 not to be always the last value of the array but generate the order of the array randomly so that the order of the array is not always the same on initialization?</p>