After realizing the my horror, that for some reason, Lua doesn’t have a Continue statement. I found this:
http://lua-users.org/wiki/GotoStatement
I liked the idea, of goto [::] as it meant, less usage of nested if/elseif statements;
and thus much cleaner code;
However the Corona, debugger crashes everytime I create a label.
::label1::
Trying the default example from the link above
for z=1,10 do
for y=1,10 do
for x=1,10 do
if x^2 + y^2 == z^2 then
print('found a Pythagorean triple:', x, y, z)
goto done
end
end end end
::done::
I get the error
’=’ expected near done
If I put a ::reset::
label at the start I get the error:
"Unexpected error near :"
Am I doing something wrong?
I checked the syntax several times, and it should be correct, according to the Lua user’s wiki.
Thanks in advance for any replies
[import]uid: 144151 topic_id: 26128 reply_id: 326128[/import]