[fpc-pascal]Re: fpc-pascal digest, Vol 1 #1610 - 12 msgs

support at falconsoft.com support at falconsoft.com
Sun Dec 8 16:07:31 CET 2002


> Finally, in response to the original poster: "for x := 0 to -1 do..."
> will indeed not exexcute any iteration under FPC.

Right now, I have

{$MODE OBJFPC}

destructor tScreen.Destroy;
var
  I : tUnsigned16;
  W : tWindow;
begin
  WriteLn('Count: ' + IntToStr(myWindows.Count));
  for I := 0 to myWindows.Count - 1 do begin
    W := tWindow(myWindows[I]);
    W.Close;
  end;
end;

in the code and the loop does in fact execute, even though myWindows.Count
is zero.  The error message I get when I run this code is:

Count: 0
An unhandled exception occurred at 0x00405DA9 :
List index exceeds bounds (0)
  0x00405DA9

Tim







More information about the fpc-pascal mailing list