title: How to use this: array[0..x] of byte?
body: <p>I have this piece of code.
  The BufferAddress was initially of PByteArray type.
  However, PByteArray is limited to 32768 elements but I need more than than. </p>
  
  <p>I don't need at run time what is the maximum limit, so I defined TLargeArrayOfBytes from 0 to 2GB. There is a nicer way to do it?</p>
  
  <pre><code>function TBufferedStream.Read(VAR aBuffer; Count: Integer): Longint;
  TYPE
     TLargeArrayOfBytes = array[0..2000000000] of Byte;
     PArrayOfBytes = ^TLargeArrayOfBytes;
  VAR
     BufferAddress: PArrayOfBytes;       // it was PByteArray
  begin
   ...
  
   { Then refill buffer... }
   FillReadBuffer;
  
   { ...and continue reading }
   BufferAddress:= @TLargeArrayOfBytes(aBuffer);
   Result:= Result+ ReadFromBuffer(BufferAddress[Result], Count- Result);  { Read from RAM buffer }
  end;
  </code></pre>
  
  <hr>
  
  <p>Delphi 7</p>