ARRAYTOLIST {} throws an error -- should output []
A Logo programming environment for Microsoft Windows
Brought to you by:
david_costanzo
ARRAYTOLIST has a bug that it doesn't handle a zero-dimension array.
The exists as far back as MSWLogo 6.5b, although it was not possible to see because a different bug prevented MSWLogo 5.6b from creating zero-dimension arrays.
In UCBLogo 6.0 ARRAYTOLIST {} correctly outputs [].
Steps to Reproduce:
SHOW ARRAYTOLIST {}
What Happens:
FMSLogo throws the error "first doesn't like {} as input"
Expected Result:
[]
This may be the root cause of Bug [#362]. If so, the fix to SORT should be reverted once ARRAYTOLIST is fixed.
Related
Bugs:
#362This is fixed by [r6167]. The fix will be available in FMSLogo 8.5.0. I also reverted the fix for Bug #362 with [r6168], which is no longer needed.
This a bug in FIRST. For some reason, when FIRST is given an array as input, it outputs the array's origin, instead of the first element. The bug is that when FIRST was given an empty array, it behaved more like it was given an empty list (throwing an error), instead of outputting the origin. The fix is to always make FIRST output an array's origin, even if it's empty.
In UCBlogo 6.2.5,
FIRST {}outputs the origin. I copied this behavior, but not the implementation.Related
Bugs:
#362Commit: [r6167]
Commit: [r6168]