+asNumber
authorClaus Gittinger <cg@exept.de>
Wed, 19 Dec 2007 15:33:31 +0100
changeset 10817 f73fcb4b935b
parent 10816 be3982069cfe
child 10818 cbbb7124b553
+asNumber
False.st
--- a/False.st	Wed Dec 19 15:33:28 2007 +0100
+++ b/False.st	Wed Dec 19 15:33:31 2007 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Boolean subclass:#False
@@ -56,7 +55,6 @@
 "
 ! !
 
-
 !False methodsFor:'conditional evaluation'!
 
 and:aBlock
@@ -117,6 +115,14 @@
     ^ aBlock value
 ! !
 
+!False methodsFor:'converting'!
+
+asNumber
+    "false->0; true->1"
+
+    ^ 0
+! !
+
 !False methodsFor:'logical operations'!
 
 & aBoolean
@@ -182,5 +188,5 @@
 !False class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/False.st,v 1.23 2006-08-23 14:07:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/False.st,v 1.24 2007-12-19 14:33:31 cg Exp $'
 ! !