This behavior was a little unexpected.
newLISP v.10.7.5 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h
> (read-expr "08")
0
> (read-expr "07")
7
> (read-expr "06")
6
> (read-expr "09")
0
> (eval-string "08")
8
> (eval-string "09")
9
> (read-expr "08")
0
> $count
1
> (read-expr "07")
7
> $count
2
>
(read-expr "08") reads octal?
Re: (read-expr "08") reads octal?
It says in the manual that those expressions are octal.
(λx. x x) (λx. x x)
Re: (read-expr "08") reads octal?
Aha!:
"Octals start with an optional + (plus) or - (minus) sign and a 0 (zero), followed by any combination of the octal digits: 01234567. Any other character ends the octal number. Only up to 21 octal digits are valid and any more digits are ignored."
Thanks.
"Octals start with an optional + (plus) or - (minus) sign and a 0 (zero), followed by any combination of the octal digits: 01234567. Any other character ends the octal number. Only up to 21 octal digits are valid and any more digits are ignored."
Thanks.