Hello,

Just curious what's going on here.
In debug mode can see i = Length(aBuf) when it first steps into the loop
And it goes from Length down to 0 instead of 0 to Length

  repeat
    BlockRead(F2, aBuf, SizeOf(aBuf), iNumRead);
    for i := 0 to Length(aBuf) - 1 do begin
      if (aBuf[i] = #13) and (aBuf[i+1] = #10) then begin 
        Inc(iRows);
      end;
    end;

    for i := 0 to Length(aBuf) - 1 do begin
      aBuf[i] := #0;
    end;
  until iNumRead = 0;

Tried using Low and High instead of Length - same thing.

Why ?

Does it have anything to do with aBuf being a static array declared as:

aBuf: array[1..65536] of Char;

Thank you,
Sergei
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to