The following output "true
NUMBER? -1
NUMBER? "-1
NUMBER? "\-\1
But NUMBER? "|-1| outputs false. The vertical barring is supposed to make sure that what's enclosed makes it into the word, so "|-1| shouldn't behave different from "-1, at least for numeric operations.
This also leads to procedures incorrectly rejecting vbarred numbers as malformed
? SHOW SUM 0 "|-1|
SUM doesn't like |-1| as input
? FORWARD "|-100|
FORWARD doesn't like |-100| as input
The problem happens for any vbarred words that are well-formed numbers which contain a + or a - character. For example
? SHOW NUMBER? "|1e+1|
false
This is reproducible in UCBLogo 6.2 and MSWLogo 6.5b.
I believe the bug is that numberp doesn't handle vbarred strings correctly and cnv_node_to_numnode assumes that it does.
It's also not clear why - and + are handled specially by the vertical bars. I suspect this was done without much thinking early on and never questioned later. A high risk, but simple, fix would be not to consider them as special characters.