From: Rohit Gupta [mailto:[EMAIL PROTECTED]]
> Has anyone come across a compiler bug in D5..
> 
> for I := 0 to StringList.Count-1
> do blah blah..
> 
> I starts at 1.  No, its not optimization, thats turned off.  the code 
> does not infact execute for I = 0, its not the IDE debugger either.
> 
> These bugs are starting to get scary.

Nah, I can tell you right now that there's no such bug.  It's too
fundamental - a bug of this nature would utterly ruin all our programs and
the newsgroups would be screaming about it.

What's probably the case is that StringList.Count = 1 and the optimiser has
reversed the order of the loop, as it often does when you're not doing
anything inside the loop that depends on loop order.  In that case "I" will
start at 1 and go to 0 the second time around the loop - should be easy to
check.

Cheers,
Carl
---------------------------------------------------------------------------
    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