--- a/Number.st Thu Aug 26 12:16:54 1999 +0200
+++ b/Number.st Thu Aug 26 12:18:21 1999 +0200
@@ -103,21 +103,27 @@
nextChar := str peekOrNil
]
].
- nextChar isDigit ifFalse:[
+ (nextChar isDigit or:[nextChar == $.]) ifFalse:[
^ exceptionBlock value.
"/ value := super readFrom:str.
"/ negative ifTrue:[value := value negated].
"/ ^ value
].
- value := Integer readFrom:str radix:10.
- nextChar := str peekOrNil.
- ((nextChar == $r) or:[ nextChar == $R]) ifTrue:[
- str next.
- radix := value.
- value := Integer readFrom:str radix:radix.
+ nextChar == $. ifTrue:[
+ radix := 10.
+ value := 0.0.
] ifFalse:[
- radix := 10
+ value := Integer readFrom:str radix:10.
+ nextChar := str peekOrNil.
+ ((nextChar == $r) or:[ nextChar == $R]) ifTrue:[
+ str next.
+ radix := value.
+ value := Integer readFrom:str radix:radix.
+ ] ifFalse:[
+ radix := 10
+ ].
].
+
(nextChar == $.) ifTrue:[
str next.
nextChar := str peekOrNil.
@@ -624,5 +630,5 @@
!Number class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.50 1999-08-04 19:34:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.51 1999-08-26 10:18:21 cg Exp $'
! !