Version: 0.6 (using KDE KDE 3.4.1)
Installed from: Gentoo Packages
Compiler: gcc version 3.3.5-20050130
The 'else' keyword is not being recognized. When I enter the example given in the documentation:
a = 1
b = 5
if not ((a < 10) and (b == 5)) [
print "not hello ;-)"
the Error Dialog box shows the message "cannot understand 'else'"
Reproducable. Important statement to make working programs.
Created attachment 14029 [details]
Trace file using following example:
if a==4 [
print "not ok"
Confirmed on kturtle 0.6 on SuSE 10. I've tried copying code in verbatim from the manual, so this is IMHO a serious issue, since it limits the logo implementation. Should be fixed in next version.
*** Bug has been marked as fixed ***.
Bbefore the fix only
] else [
works but not
as in the manual examples.
I reopen the bug report so that the examples in the user manual can be compiled. I'll add a patch, to be committed whenever possible as 3.5.6 tagging has just been done.
Created attachment 19301 [details]
fixes the else issue so the doc examples work
SVN commit 676365 by annma:
fix "else" bug
M +1 -1 parser.cpp
--- branches/KDE/3.5/kdeedu/kturtle/src/parser.cpp #676364:676365
@@ -932,7 +932,7 @@
if (currentToken.type == tokElse) // else part
+ while (currentToken.type == tokEOL) getToken();
if (currentToken.type == tokDo) getToken(); // next word
if(currentToken.type == tokBegin) node->appendChild( Block() ); // else is followed by block