avoid double-send of digitValue
authorClaus Gittinger <cg@exept.de>
Fri, 12 Jan 2007 21:57:41 +0100
changeset 10321 c07d199084fc
parent 10320 a573647dad4f
child 10322 b1c70a1fc8d7
avoid double-send of digitValue
Number.st
--- a/Number.st	Fri Jan 12 21:24:14 2007 +0100
+++ b/Number.st	Fri Jan 12 21:57:41 2007 +0100
@@ -586,17 +586,17 @@
      No whitespace is skipped.
      Errs if no number is available on aStream."
 
-    |nextChar value factor intMantissa scale highPrecision|
+    |nextChar value factor intMantissa scale digit|
 
-    highPrecision := false.
     value := 0.0.
     factor := 1.0 / radix.
     scale := 0.
     intMantissa := 0.
     nextChar := aStream peekOrNil.
     [nextChar notNil and:[nextChar isDigitRadix:radix]] whileTrue:[
-        value := value + (nextChar digitValue * factor).
-        intMantissa := (intMantissa * radix) + nextChar digitValue.
+        digit := nextChar digitValue.
+        value := value + (digit * factor).
+        intMantissa := (intMantissa * radix) + digit.
         factor := factor / radix.
         scale := scale + 1.
         scale > 6 ifTrue:[
@@ -1890,5 +1890,5 @@
 !Number class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.106 2007-01-12 20:24:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.107 2007-01-12 20:57:41 cg Exp $'
 ! !