read/write invariance broken for some symbols
Brought to you by:
mradestock,
scgmille
(let ([x (string->symbol "1")])
(eq? (with-input-from-string
(with-output-to-string
(lambda () (write x)))
(lambda () (read)))
x))
;=> '#f
|string->symbol| returns a symbol. |write| renders this
as \1 which |read| reads as the *number* 1.
One way to fix this would be to write |\1| instead, but
I don't know how difficult this would be and whether it
would break anything else.
Logged In: YES
user_id=25869
Well, with pipe characters, I'm not even sure the backslash
would be necessary, but pipes are the way to go. mzscheme
does this. Surprisingly, this is broken in Scheme48 as well.
Logged In: YES
user_id=110070
Fixed in CVS.