FMSLogo generally runs all instructions up to the point of an error. However for some, it stops running instructions before it gets to the problem. This brings some implementation details into the language specification. It would be better if the errors were treated the same.
The bug can be seen by running the following procedure
To ShowBug
make "x 0
make "y 0
make "z 0
CATCH "ERROR [
make "x 1
IGNORE (UnknownProc [255 0 0])
]
CATCH "ERROR [
make "y 1
IGNORE (REMAINDER 1 2 3)
]
CATCH "ERROR [
make "z 1
IGNORE (REMAINDER 1)
]
SHOW (se [x =] :x [, y =] :y [, z =] :z)
End
Each of the CATCH blocks has a valid instruction with a detectable side effect, followed by one that throws an error. So you'd think that they'd all behave the same. However when run only the following is printed:
showbug
[x = 0 , y = 0 , z = 1]
This indicates that the "unknown parameters" and the "too many inputs" errors somehow prevented the instructions before it from running, whereas the "not enough inputs" didn't.
When the instructions are all on different lines, this is a duplicate of Bug #250.
This bug has been fixed, so the repro steps in the description no longer reproduce any problem.
When the instructions are on the same line, this is a duplicate of Bug #625.
Related
Bugs:
#250Bugs: #625