--- a/Float.st Wed May 14 17:00:42 2014 +0200
+++ b/Float.st Wed May 14 17:01:05 2014 +0200
@@ -282,6 +282,10 @@
%}
!
+coerce:aNumber
+ ^ aNumber asFloat.
+!
+
fastFromString:aString at:startIndex
"return the next Float from the string starting at startIndex.
No spaces are skipped.
@@ -386,27 +390,6 @@
}
%}.
^ nil
-!
-
-readFrom:aStringOrStream onError:exceptionBlock
- "read a float from a string"
-
- |num|
-
- num := super readFrom:aStringOrStream onError:nil.
- num isNil ifTrue:[
- ^ exceptionBlock value
- ].
- ^ num asFloat
-
- "
- Float readFrom:'.1'
- Float readFrom:'0.1'
- Float readFrom:'0'
- "
-
- "Created: / 07-01-1998 / 16:17:19 / cg"
- "Modified: / 23-11-2010 / 14:35:41 / cg"
! !
!Float class methodsFor:'accessing'!
@@ -419,6 +402,7 @@
DefaultPrintFormat := something.
! !
+
!Float class methodsFor:'binary storage'!
readBinaryIEEEDoubleFrom:aStream
@@ -674,6 +658,7 @@
"
! !
+
!Float class methodsFor:'queries'!
exponentCharacter
@@ -1609,6 +1594,7 @@
"Modified: / 16.11.2001 / 14:14:43 / cg"
! !
+
!Float methodsFor:'printing & storing'!
printString
@@ -2005,6 +1991,7 @@
"
! !
+
!Float methodsFor:'testing'!
isFinite
@@ -2904,11 +2891,11 @@
!Float class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.196 2013-05-21 20:45:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.197 2014-05-14 15:01:05 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.196 2013-05-21 20:45:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.197 2014-05-14 15:01:05 stefan Exp $'
! !