What is The Loop Variable After a If Loop in Delphi?

Posted by Andreas Rejbrand on Stack Overflow See other posts from Stack Overflow or by Andreas Rejbrand
Published on 2010-04-09T21:01:48Z Indexed on 2010/04/09 21:03 UTC
Read the original article Hit count: 331

Filed under:
|
|

In Delphi, consider

var
  i: integer;

begin

  for i := 0 to N do
  begin
    { Code }
  end;

One might think that i = N after the for loop, but does the Delphi compiler guarantee this? Can one make the assumption that i = N after a for loop?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about for-loop