>From memory that is how they code most (all?) while/for loops. They place a
jump at the top of the code (or duplicate the first test condition at the
top) to the actual test which occurs at the end of the loop, so they can
then do a conditional jump to the top of the loop while the continue
condition is true ...
Makes sense when writing assembler code ...
- Seems like the IDE/Debugger actually put the breakpoint in the wrong place
...
I had a worse one the other week - the debugger went into an infinite loop
(not the first time I had this problem) on the second pass through the loop.
When not run under the debugger all was fine ... Go figure that one - (gave
me a headache ...)
I gave up and re-write the code so I could debug the portion I wanted to
view ..
Myles.
> -----Original Message-----
> From: Rohit Gupta [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 04, 2000 3:18 PM
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Another D5 compiler bug ?
>
>
> You are so right.... the dratted thing puts the for loop as a
> while at
> the end of the code, so that first break point on the for
> line is after
> the first pass. How the heck is anyone supposed to debug
> anything ?
>
> There is absolutely no excuse for this nonsense. IT wouldnt have
> taken Borland more than a days work to implement a for loop
> properly.... instead of twisting everything to yucky C. bleh.
>
> To: Multiple recipients of list delphi
> <[EMAIL PROTECTED]>
> Send reply to: [EMAIL PROTECTED]
> From: Myles Penlington <[EMAIL PROTECTED]>
> Subject: RE: [DUG]: Another D5 compiler bug ?
> Date sent: Mon, 4 Dec 2000 11:32:45 +1300
>
> > Has the compiler decided to do a Downto instead??
> > It can depending on the loop variable usage - have not seen
> it happen myself
> > yet.
> >
> > I always check the disassembled code when I have one of
> these issues to see
> > what is actually wrong - compiler or debugger - Has always
> turned out to be
> > the debugger every time.
> >
> > Myles.
> >
> > > -----Original Message-----
> > > From: Rohit Gupta [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, December 04, 2000 12:14 PM
> > > To: Multiple recipients of list delphi
> > > Subject: [DUG]: Another D5 compiler bug ?
> > >
> > >
> > > 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.
> > >
> > > Regards
> > >
> > > Rohit
> > >
> > >
> ======================================================================
> > > CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL,
> New Zealand
> > > PH (649) 489-2280
> > > FX (649) 489-2290
> > > email [EMAIL PROTECTED] or [EMAIL PROTECTED]
> > >
> ======================================================================
> > >
> > > --------------------------------------------------------------
> > > -------------
> > > 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"
> > >
> >
> --------------------------------------------------------------
> -------------
> > 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"
> >
>
>
> Regards
>
> Rohit
>
> ======================================================================
> CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand
> PH (649) 489-2280
> FX (649) 489-2290
> email [EMAIL PROTECTED] or [EMAIL PROTECTED]
> ======================================================================
>
> --------------------------------------------------------------
> -------------
> 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"
>
---------------------------------------------------------------------------
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"