I use Break if something is found, otherwise let it run to the end. It's very convenient to test i > maxvalue at the end to know if a break occurred or not.
So as long as I don't play with compiler switches or upgrade my version of Delphi, I should be ok? Ross. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Peacocke Sent: Tuesday, 7 August 2007 15:32 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] for..loop Break? Steve -- Steve Peacocke http://stevepeacocke.blogspot.com/ On 07/08/07, Ross Levis <[EMAIL PROTECTED]> wrote: > 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
