commentary
authorClaus Gittinger <cg@exept.de>
Thu, 31 Jul 1997 13:20:07 +0200
changeset 2816 62edd11b5e66
parent 2815 6a562d0fb864
child 2817 10f114dfe605
commentary
Integer.st
LargeInt.st
LargeInteger.st
--- a/Integer.st	Thu Jul 31 13:19:30 1997 +0200
+++ b/Integer.st	Thu Jul 31 13:20:07 1997 +0200
@@ -1213,9 +1213,13 @@
 
 digitLength
     "return the number of bytes needed for the binary representation
-     of the receiver"
+     of the receiver.
+     This method is redefined in concrete classes - the fallback here is
+     never really used."
 
     ^ (self log:256) ceiling asInteger
+
+    "Modified: 31.7.1997 / 13:19:06 / cg"
 !
 
 isInteger
@@ -1389,5 +1393,5 @@
 !Integer class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.66 1997-07-28 17:26:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.67 1997-07-31 11:20:07 cg Exp $'
 ! !
--- a/LargeInt.st	Thu Jul 31 13:19:30 1997 +0200
+++ b/LargeInt.st	Thu Jul 31 13:20:07 1997 +0200
@@ -595,7 +595,9 @@
 !
 
 digitLength
-    "return the number bytes used by this Integer"
+    "return the number bytes used by this Integer.
+     For negative receivers, the digitLength of its absolute value
+     is returned."
 
     "
      check if there is a 0-byte ...
@@ -606,11 +608,11 @@
 
     l := digitByteArray size.
     [l ~~ 0 and:[(digitByteArray at:l) == 0]] whileTrue:[
-	l := l - 1.
+        l := l - 1.
     ].
     ^ l
 
-    "Modified: 2.2.1996 / 16:47:21 / cg"
+    "Modified: 31.7.1997 / 13:18:28 / cg"
 !
 
 digits
@@ -2054,5 +2056,5 @@
 !LargeInteger class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/LargeInt.st,v 1.47 1997-07-28 17:11:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/LargeInt.st,v 1.48 1997-07-31 11:19:50 cg Exp $'
 ! !
--- a/LargeInteger.st	Thu Jul 31 13:19:30 1997 +0200
+++ b/LargeInteger.st	Thu Jul 31 13:20:07 1997 +0200
@@ -595,7 +595,9 @@
 !
 
 digitLength
-    "return the number bytes used by this Integer"
+    "return the number bytes used by this Integer.
+     For negative receivers, the digitLength of its absolute value
+     is returned."
 
     "
      check if there is a 0-byte ...
@@ -606,11 +608,11 @@
 
     l := digitByteArray size.
     [l ~~ 0 and:[(digitByteArray at:l) == 0]] whileTrue:[
-	l := l - 1.
+        l := l - 1.
     ].
     ^ l
 
-    "Modified: 2.2.1996 / 16:47:21 / cg"
+    "Modified: 31.7.1997 / 13:18:28 / cg"
 !
 
 digits
@@ -2054,5 +2056,5 @@
 !LargeInteger class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.47 1997-07-28 17:11:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.48 1997-07-31 11:19:50 cg Exp $'
 ! !