Function: math-read-radix

math-read-radix is a byte-compiled function defined in calc-ext.el.gz.

Signature

(math-read-radix S R)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-ext.el.gz
(defun math-read-radix (s r)   ; [I X D]
  (setq s (upcase s))
  (let ((i 0)
	(res 0)
	dig)
    (while (and (< i (length s))
		(setq dig (math-read-radix-digit (elt s i)))
		(< dig r))
      (setq res (math-add (math-mul res r) dig)
	    i (1+ i)))
    (and (= i (length s))
	 res)))