1. is this ex.err bug?
- Posted by Tone Škoda <tskoda at email.si> Jan 31, 2005
- 460 views
among other things this is in ex.err: rowIndex = 3 winIndex = 2 rowIndex = 3 winIndex = 2 rowIndex = 2 winIndex = 2 They are duplicated, what value rowIndex had at crash, 2 or 3? This is the code which crashed and produced this ex.err: rowTopY = 0 for rowIndex = 1 to length (allRows) do windows = row [ROW_WINDOWS] winsData = row [ROW_WINSDATA] rowWinsPlac = allWinsPlac [rowIndex] for winIndex = 1 to length (windows) do winData = winsData [winIndex] if winData [RS_VALIGN] = RS_TOP then y = rowTopY + winData [RS_TOPSPACE] elsif winData [RS_VALIGN] = RS_CENTER then y = rowTopY - floor (rowsHeights [rowIndex] / 2) elsif winData [RS_VALIGN] = RS_BOTTOM then y = rowTopY + rowsHeights [rowIndex] - winData [RS_BOTTOMSPACE] - rowWinsPlac [winIndex] [WP_HEIGHT] end if -- THIS LINE BELOW CRASHED rowWinsPlac [winIndex] [WP_TOP] = y end for allWinsPlac [rowIndex] = rowWinsPlac rowTopY += rowsHeights [rowIndex] end for I thinks it has got to do something with the fact that I have in same procedure above this loop two similar loops, both those loops have this: for rowIndex = 1 to length (allRows) do .... for winIndex = 1 to length (windows) do .... Or is this expected behavior? it's a little confusing.
2. Re: is this ex.err bug?
- Posted by Robert Craig <rds at RapidEuphoria.com> Jan 31, 2005
- 454 views
Tone Škoda wrote: > among other things this is in ex.err: > > rowIndex = 3 > winIndex = 2 > rowIndex = 3 > winIndex = 2 > rowIndex = 2 > winIndex = 2 > > They are duplicated, what value rowIndex had at crash, 2 or 3? Euphoria creates a separate variable for each for for-loop, even if the name is the same. This can result in the same name appearing multiple times (in order of declaration in the source file.) One could argue that I shouldn't report a for-loop variable at all in ex.err if the loop has terminated, but I think the extra information might be useful to someone, although a bit confusing. egards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: is this ex.err bug?
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jan 31, 2005
- 445 views
On Sun, 30 Jan 2005 20:50:20 -0800, Robert Craig <guest at RapidEuphoria.com> wrote: >One could argue that I shouldn't report >a for-loop variable at all in ex.err if the loop has terminated, >but I think the extra information might be useful to someone, >although a bit confusing. OK, I'll argue for it I think if a newbie sees rowIndex[1]=10 but rowIndex[2]=5, they'll know the second loop has exited prematurely, so their natural reaction will be to code: end for if rowIndex!=10 then -- loop abandoned? Of course the best thing would be to show eg: [rowIndex = 10] [rowIndex = 5] rowIndex = 3 Regards, Pete
4. Re: is this ex.err bug?
- Posted by Alexander Toresson <alexander.toresson at gmail.com> Jan 31, 2005
- 432 views
Robert Craig wrote: > > Tone Škoda wrote: > > among other things this is in ex.err: > > > > rowIndex = 3 > > winIndex = 2 > > rowIndex = 3 > > winIndex = 2 > > rowIndex = 2 > > winIndex = 2 > > > > They are duplicated, what value rowIndex had at crash, 2 or 3? > > Euphoria creates a separate variable for each for for-loop, > even if the name is the same. This can result in the > same name appearing multiple times (in order of declaration > in the source file.) One could argue that I shouldn't report > a for-loop variable at all in ex.err if the loop has terminated, > but I think the extra information might be useful to someone, > although a bit confusing. > Maybe you could also show the line where the variable is defined, in the case of a variable with a duplicate name? Regards, Alexander Toresson Assembly. Push 'till you pop.