Closed mnalis closed 4 years ago
Thanks. This is probably a place where a promise rejection is getting dropped rather than propagating out (the code is pre-async/await)
This was a bug in WHILE
where termination wasn't handled. Thanks for the report!
for example, paste the code:
and click Run button. Button will change to "Stop", and program will draw a square and execute everything up to and including first
pr :b
, but executing will then halt silently (without any error) onmake "b :b-:a
so secondpr :b
will never execute (nor will rest of loop iterations).Button in JSLogo will continue showing
Stop
. WhenStop
button is pressed, trying to run anything else will silently fail (see issue https://github.com/inexorabletash/jslogo/issues/124). After that only way to make JSLogo start executing commands again is to refresh the browser window (F5
orctrl-r
).If line
make "b :b-:a
is corrected tomake "b :b - :a
(spaces added around minus sign) in newly opened window, the program works just fine.Probably JSLogo should accept that line without space (like FMS Logo does, for example), or it should show an error like it does when you try to access nonexistant variable (instead of silently crashing the interpreter as it does now).