chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #333: read/write invariance on symbols consisting of


From: Chicken Trac
Subject: [Chicken-janitors] #333: read/write invariance on symbols consisting of digits
Date: Thu, 12 Aug 2010 21:05:45 -0000

#333: read/write invariance on symbols consisting of digits
---------------------------------------+------------------------------------
 Reporter:  zbigniew                   |       Owner:       
     Type:  defect                     |      Status:  new  
 Priority:  minor                      |   Milestone:  4.6.0
Component:  core libraries             |     Version:  4.5.x
 Keywords:  3 is the loneliest symbol  |  
---------------------------------------+------------------------------------
 {{{
 (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
 }}}

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/333>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]