From: Geoffrey K. <ge...@kn...> - 2004-06-07 15:05:32
|
On Jun 7, 2004, at 10:24, Ken Anderson wrote: > So the remaining issue is what should (string->number "08") return. > It currently returns #f. i was hoping it would return 8. (string->number "08") => 8 would be consistent with C I just tried scanf of 08, 09, 010 in C, and got 8, 9, 10. However, C is not always consistent with itself; 08 cannot be used as a constant: foo.c:9:19: invalid digit "8" in octal constant Since Tim's unit tests already include: (equal? (string->number "010") 10) I think (string->number string-value) in the absence of radix should assume a radix of 10. Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk |