mes: string->number: Support upper case hex.
* module/mes/scm.mes (string->number): Support upper case hex.
This commit is contained in:
parent
cfda148e1e
commit
7f712e4555
|
@ -246,6 +246,11 @@
|
||||||
(<= i (char->integer #\f)))
|
(<= i (char->integer #\f)))
|
||||||
(let ((d (char->integer #\a)))
|
(let ((d (char->integer #\a)))
|
||||||
(loop (cdr lst) (+ (* n radix) (- i (- d 10))))))
|
(loop (cdr lst) (+ (* n radix) (- i (- d 10))))))
|
||||||
|
((and (= radix 16)
|
||||||
|
(>= i (char->integer #\A))
|
||||||
|
(<= i (char->integer #\F)))
|
||||||
|
(let ((d (char->integer #\A)))
|
||||||
|
(loop (cdr lst) (+ (* n radix) (- i (- d 10))))))
|
||||||
((= i (char->integer #\.)) ; minimal FLOAT support
|
((= i (char->integer #\.)) ; minimal FLOAT support
|
||||||
(let ((fraction (cdr lst)))
|
(let ((fraction (cdr lst)))
|
||||||
(if (null? fraction) n
|
(if (null? fraction) n
|
||||||
|
|
Loading…
Reference in a new issue