Open zigggit opened 4 years ago
Indeed, that's not a well-formed TO form. It should error rather than segfaulting, of course.
My guess is that TO is treating the [1] as if it were [:foo], i.e., using 1 as the variable name for a rest argument. So when STUFF is invoked, it's trying to set the value of 1 to a list of inputs (in this case an empty list, but if it were (STUFF A B C) the list would be [A B C].
You can have a variable named 1, by saying MAKE 1 [some value]. Then ? print 1 1 ? print :1 some value
If a procedure similar to the following is defined
to stuff [ 1 ] print [Any Logo you like here] end
then UCB Logo exits with a segmentation fault as soon as the procedure is invoked.
Is this even a valid thing to define? My knowledge isn't good enough to be certain, but I suspect it might not be. Perhaps such a definition should be rejected in the first place.