[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #205: number->string does not accept abritrary radixe
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #205: number->string does not accept abritrary radixes |
Date: |
Sun, 04 Apr 2010 19:46:39 -0000 |
#205: number->string does not accept abritrary radixes
-------------------------------+--------------------------------------------
Reporter: ckeen | Owner:
Type: enhancement | Status: new
Priority: not urgent at all | Milestone: 4.5.0
Component: unknown | Version: 4.4.x
Keywords: |
-------------------------------+--------------------------------------------
The current implementation does not allow any other radix than the ones
mentioned in R5RS (2,8,10,16). Whereas string->number does:
(use srfi-1)
(map (lambda (n) (string->number "11" n)) (iota 15 2))
-> (3 4 5 6 7 8 9 10 11 12 13 14 15 16 17)
I think it is convenient if number->string supports at least arbitrary
radix values form [2,..,16].
The attached diff does exactly that. Since it is a general function that
of course will also do binary, the patch removes the old binary function
code.
Since this is my first patch I am completely unbiased and open for
suggestions on coding style etc. Please keep the feedback comming!
--
Ticket URL: <http://www.irp.oist.jp/trac/chicken/ticket/205>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #205: number->string does not accept abritrary radixes,
Chicken Trac <=