comparison lisp/calculator.el @ 39818:6564021e098e

(calculator-eng-display): Don't call concat with an integer argument.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 12 Oct 2001 09:05:29 +0000
parents 48633cf4ce7c
children f18f05d77411
comparison
equal deleted inserted replaced
39817:503b25e023a5 39818:6564021e098e
2 2
3 ;; Copyright (C) 1998, 2000, 2001 by Free Software Foundation, Inc. 3 ;; Copyright (C) 1998, 2000, 2001 by Free Software Foundation, Inc.
4 4
5 ;; Author: Eli Barzilay <eli@barzilay.org> 5 ;; Author: Eli Barzilay <eli@barzilay.org>
6 ;; Keywords: tools, convenience 6 ;; Keywords: tools, convenience
7 ;; Time-stamp: <2001-09-23 02:24:35 eli> 7 ;; Time-stamp: <2001-10-11 16:18:29 eli>
8 8
9 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
10 10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify it 11 ;; GNU Emacs is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by the 12 ;; under the terms of the GNU General Public License as published by the
986 (setq i (1- i))) 986 (setq i (1- i)))
987 (while (< i 0) 987 (while (< i 0)
988 (setq num (/ num 1000.0)) (setq exp (+ exp 3)) 988 (setq num (/ num 1000.0)) (setq exp (+ exp 3))
989 (setq i (1+ i))))))) 989 (setq i (1+ i)))))))
990 (or calculator-eng-tmp-show (setq calculator-eng-extra nil)) 990 (or calculator-eng-tmp-show (setq calculator-eng-extra nil))
991 (let ((str (format (concat "%." calculator-number-digits "f") 991 (let ((str (format (concat "%." (number-to-string
992 calculator-number-digits)
993 "f")
992 num))) 994 num)))
993 (concat (let ((calculator-remove-zeros 995 (concat (let ((calculator-remove-zeros
994 ;; make sure we don't leave integers 996 ;; make sure we don't leave integers
995 (and calculator-remove-zeros 'x))) 997 (and calculator-remove-zeros 'x)))
996 (calculator-remove-zeros str)) 998 (calculator-remove-zeros str))