thru 3 for i in [2,4] do print(i);
parses as
((MDOIN SIMP) $I ((MLIST SIMP) 2 4) NIL NIL 3 NIL (($PRINT SIMP) $I))
which prints as
for i in [2,3,4] thru 3 do print(i);
When executed, it prints 2 and 3
It is apparently equivalent to
for i in [2,3,4] while i<=3 do print(i)
or
while i<=3 for i in [2,3,4] do print(i)
On the other hand,
for i in [2,4] thru 3 do print(i)
says "A do cannot have a thru with a [sic] in field"
The first version should cause the same parse error.
Maxima branch_5_37_base_528_g802ae7f on SBCL 1.2.11
No problems with the test suite, share test suite or rtest_translator.
Before:
After:
Fixed by commit [f2a4dd].
Related
Commit: [f2a4dd]