I think what they mean is that the compiler can change between versions, hence the value may change. The important issue is that Codegear makes no warranties as to the value on exit from the loop. If they decided to trash the value due to the way the registers are used, it could have any value.
The value could change depending on the code optimisations used (or between $O+ and $O- for that matter). In fact the last value used may not be stored anywhere, can't say I've has cause to recently look at the code emitted in this case. Myles. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ross Levis Sent: Tuesday, 7 August 2007 03:22 To: 'NZ Borland Developers Group - Delphi List' Subject: [DUG] for..loop Why does the Delphi help say that a For loop variable has an undefined value after the loop finishes it's iterations? Surely the variable is always 1 greater than the maximum "To" value. That is what appears to happen in all situations I've tested. I often use this test after a For loop to tell if something was not found. What would cause a different result than this? Cheers, Ross. _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: [email protected] Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe Attention: This communication is confidential and may be legally privileged. If you are not the intended recipient, please do not use, disclose, copy or distribute it, other than to return it to us with your confirmation that it has been deleted from your system. _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: [email protected] Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
