Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#333 closed defect (fixed)

read/write invariance on symbols consisting of digits

Reported by: Jim Ursetto Owned by:
Priority: minor Milestone:
Component: core libraries Version: 4.5.x
Keywords: 3 is the loneliest symbol Cc:
Estimated difficulty:

Description

(symbol->string
 (with-input-from-string
  (with-output-to-string
   (lambda ()
    (write (string->symbol "3"))))
  read))

Error: (symbol->string) bad argument type - not a symbol: 3

because the 3 is read as a number. In other words, (string->symbol "3") should return |3| not 3. It works fine for floating point numbers, though.

#;11> (string->symbol "1.3")
|1.3|
#;12> (string->symbol "3")
3

Change History (2)

comment:1 Changed 12 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

comment:2 Changed 12 years ago by felix winkelmann

Milestone: 4.6.0

Milestone 4.6.0 deleted

Note: See TracTickets for help on using tickets.