summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2005-05-02 19:45:57 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2005-05-02 19:45:57 +0000
commit28572d7db775d1ec4b424761887df08b76aca89f (patch)
treedda4fc0a2d5a6ca4913766cb8875af89e347ffc5
parentca9cbc3193fc4a8853cbf02b089fdacda4174f78 (diff)
downloademacs-28572d7db775d1ec4b424761887df08b76aca89f.tar.gz
(calcDigit-key, math-read-number, math-read-bignum): Replace
string-to-int by string-to-number.
-rw-r--r--lisp/calc/calc.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index ce9681b828f..617fc1ddc89 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -2136,7 +2136,7 @@ See calc-keypad for details."
(t
(insert (char-to-string last-command-char))
(if (or (and (calc-minibuffer-contains "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9][0-9]?\\)#[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\)?\\|.[0-9a-zA-Z]*\\(e[-+]?[0-9]*\\)?\\)?\\'")
- (let ((radix (string-to-int
+ (let ((radix (string-to-number
(buffer-substring
(match-beginning 2) (match-end 2)))))
(and (>= radix 2)
@@ -3278,7 +3278,7 @@ See calc-keypad for details."
(eq (aref digs 0) ?0))
(math-read-number (concat "8#" digs))
(if (<= (length digs) 6)
- (string-to-int digs)
+ (string-to-number digs)
(cons 'bigpos (math-read-bignum digs))))))
;; Clean up the string if necessary
@@ -3315,7 +3315,7 @@ See calc-keypad for details."
(exp (math-match-substring s 2)))
(let ((mant (if (> (length mant) 0) (math-read-number mant) 1))
(exp (if (<= (length exp) (if (memq (aref exp 0) '(?+ ?-)) 8 7))
- (string-to-int exp))))
+ (string-to-number exp))))
(and mant exp (Math-realp mant) (> exp -4000000) (< exp 4000000)
(let ((mant (math-float mant)))
(list 'float (nth 1 mant) (+ (nth 2 mant) exp)))))))
@@ -3330,9 +3330,9 @@ See calc-keypad for details."
(defun math-read-bignum (s) ; [l X]
(if (> (length s) 3)
- (cons (string-to-int (substring s -3))
+ (cons (string-to-number (substring s -3))
(math-read-bignum (substring s 0 -3)))
- (list (string-to-int s))))
+ (list (string-to-number s))))
(defconst math-tex-ignore-words