- summary: Evaluator doesn't retreeifies mid-line --> Evaluator doesn't retreeify mid-line
The evaluator can re-treeify the running procedure if the definitions of other procedures changed in a way that impacts how the rest of the procedure is treeified. However, it only does this at the beginning of a line. If the procedure definitions change in the middle of a line, the rest of the line continues to use an incorrect tree.
How Reproducible:
Every Time
Steps to Reproduce:
TO MYTEST1
DEFINE "MYSHOW [ [a b] [SHOW :a] ] ; two inputs
MYSHOW 1 "ignore
DEFINE "MYSHOW [ [a] [SHOW :A] ]
MYSHOW 2
END
TO MYTEST2
DEFINE "MYSHOW [ [a b] [SHOW :a] ] ; two inputs
MYSHOW 1 "ignore DEFINE "MYSHOW [ [a] [SHOW :A] ] MYSHOW 2
END
MYTEST1
MYTEST2
What Happens:
MYTEST1 prints 1 2. MYTEST2 prints 1 then throws an error:
not enough inputs to MYSHOW in MYTEST2
[MYSHOW 1 "ignore DEFINE "MYSHOW [[a] [SHOW :A]] MYSHOW 2]
Expected Result:
MYTEST1 and MYTEST2 both print 1 and 2. They have the same definition, except that MYTEST2 has joined the final three lines of MYTEST1 into a single line. That shouldn't affect how the instructions are evaluated.
Notes:
This is reproducible in FMSLogo 8.5.0 and as far back as FMSLogo 6.11.0. Prior to that, the retreeifying didn't happen even at the beginning of a line and MYTEST1 couldn't even run.
This is also reproducible on UCBLogo 6.2.5.