#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Tue, 26 Apr 2016 15:44:03 +0200
changeset 19650 84b875892f4a
parent 19649 cb8cf22fbb97
child 19651 59a06f7e5116
#DOCUMENTATION by cg class: LargeInteger comment/format in:7 methods
LargeInteger.st
--- a/LargeInteger.st	Mon Apr 25 16:19:00 2016 +0200
+++ b/LargeInteger.st	Tue Apr 26 15:44:03 2016 +0200
@@ -238,7 +238,7 @@
 digitBytes:aByteArrayOfDigits
     "create and return a new LargeInteger with digits (lsb-first)
      from the argument, aByteArray.
-     Experimental interface - May change/be removed without notice."
+     The byteArray argument provides the unsigned magnitude in lsb-first order."
 
     ^ self basicNew setDigits:aByteArrayOfDigits
 
@@ -252,7 +252,8 @@
 
 digitBytes:aByteArrayOfDigits MSB:msb
     "create and return a new LargeInteger with digits (which may be in either msb/lsb order)
-     from the argument, aByteArray."
+     from the argument, aByteArray.
+     The byteArray argument provides the unsigned magnitude in the specified byte order."
 
     |digits|
 
@@ -270,9 +271,9 @@
 !
 
 digitBytes:aByteArrayOfDigits sign:sign
-    "create and return a new LargeInteger with digits (lsb-first)
+    "create and return a new sign-magnitude LargeInteger with digits (lsb-first)
      from the argument, aByteArray.
-     Experimental interface - May change/be removed without notice."
+     The byteArray argument provides the unsigned magnitude in lsb-first order."
 
     ^ self basicNew setDigits:aByteArrayOfDigits sign:sign
 
@@ -314,6 +315,8 @@
     "Modified: / 8.5.1998 / 21:40:41 / cg"
 ! !
 
+
+
 !LargeInteger class methodsFor:'queries'!
 
 isBuiltInClass
@@ -5499,23 +5502,29 @@
 !
 
 numberOfDigits:nDigits
-"/    digitByteArray := ByteArray uninitializedNew:nDigits.
+    "allocate space for nDigits bytes of magnitude"
+    
     digitByteArray := ByteArray new:nDigits.
     sign := 1.
 !
 
 numberOfDigits:nDigits sign:newSign
-"/    digitByteArray := ByteArray uninitializedNew:nDigits.
+    "allocate space for nDigits bytes of magnitude"
+
     digitByteArray := ByteArray new:nDigits.
     sign := newSign.
 !
 
 setDigits:digits
+    "set the digits from the lsb-ordered digit-bytes"
+    
     digitByteArray := digits.
     sign := 1.
 !
 
 setDigits:digits sign:newSign
+    "set the digits from the lsb-ordered digit-bytes"
+
     digitByteArray := digits.
     sign := newSign.
 !