Version: 0.8 beta (using 4.1.3 (KDE 4.1.3), Mandriva Linux release 2009.0 (Official) for i586) Compiler: gcc OS: Linux (i686) release 2.6.27.5-desktop-2mnb Nested for loops don’t seem to work. When I try the following code (which should print a multiplication table), I get the error message 'The variable '$x' was used without first being assigned to a value' reset for $x = 1 to 10 { for $y = 1 to 10 { go 30*$x,30*$y print $x*$y } }
SVN commit 899390 by nielsslot: Make nested for loops work. This solution works, but probably isn't the best. We should have a look at it again after 4.2 is released. BUG: 178186 M +4 -2 executer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=899390
The fix applied doesn’t work properly. For the above example, it skips the value of y = 1 for all values of x except x = 1. I also got KTurtle to crash by changing the y loop to go from y = 1 to 1, but can’t reproduce that.
SVN commit 907287 by nielsslot: Make nested for loops work for y = 1. See bug 178186. BUG: 178186 M +14 -3 definitions.rb M +10 -1 executer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=907287
Karl: I just committed a fix. I now get a 10 by 10 table when running your script in KTurtle. If you encounter the crash again and are able to reproduce, please file another bug.