Array.st
branchjv
changeset 18084 ab5b38bd8f81
parent 18045 c0c600e0d3b3
parent 15608 de5bfe8d3a42
child 18113 92b4242b2b0b
--- a/Array.st	Mon Aug 19 23:30:27 2013 +0100
+++ b/Array.st	Tue Aug 20 00:07:19 2013 +0100
@@ -280,7 +280,6 @@
     "Modified: 23.4.1996 / 15:55:06 / cg"
 ! !
 
-
 !Array methodsFor:'accessing'!
 
 at:index
@@ -1689,50 +1688,50 @@
     "append a printed representation of the receiver to aStream"
 
     self isLiteral ifTrue:[
-	|limit firstOne s|
+        |limit firstOne s|
 
-	thisContext isRecursive ifTrue:[
-	    'Array [error]: printOn: of self referencing collection.' errorPrintCR.
-	    aStream nextPutAll:'#("recursive")'.
-	    ^ self
-	].
+        thisContext isRecursive ifTrue:[
+            'Array [error]: printOn: of self referencing collection.' errorPrintCR.
+            aStream nextPutAll:'#("recursive")'.
+            ^ self
+        ].
 
-	aStream nextPutAll:'#('.
-	firstOne := true.
+        aStream nextPutAll:'#('.
+        firstOne := true.
 
-	"
-	 if aStream is not positionable, create an temporary positionable stream
-	 (needed for limit calculation)
-	"
-	aStream isPositionable ifTrue:[
-	    s := aStream.
-	] ifFalse:[
-	    s := WriteStream on:(String uninitializedNew:50).
-	].
-	limit := s position1Based + self maxPrint.
+        "
+         if aStream is not positionable, create an temporary positionable stream
+         (needed for limit calculation)
+        "
+        aStream isPositionable ifTrue:[
+            s := aStream.
+        ] ifFalse:[
+            s := WriteStream on:(String uninitializedNew:50).
+        ].
+        limit := s position + self maxPrint.
 
-	self printElementsDo:[:element |
-	    firstOne ifFalse:[
-		s space
-	    ] ifTrue:[
-		firstOne := false
-	    ].
-	    (s position1Based >= limit) ifTrue:[
-		s ~~ aStream ifTrue:[
-		    aStream nextPutAll:(s contents).
-		].
-		aStream nextPutAll:'...etc...)'.
-		^ self
-	    ] ifFalse:[
-		element printOn:s.
-	    ].
-	].
-	s ~~ aStream ifTrue:[
-	    aStream nextPutAll:(s contents).
-	].
-	aStream nextPut:$)
+        self printElementsDo:[:element |
+            firstOne ifFalse:[
+                s space
+            ] ifTrue:[
+                firstOne := false
+            ].
+            (s position >= limit) ifTrue:[
+                s ~~ aStream ifTrue:[
+                    aStream nextPutAll:(s contents).
+                ].
+                aStream nextPutAll:'...etc...)'.
+                ^ self
+            ] ifFalse:[
+                element printOn:s.
+            ].
+        ].
+        s ~~ aStream ifTrue:[
+            aStream nextPutAll:(s contents).
+        ].
+        aStream nextPut:$)
     ] ifFalse:[
-	super printOn:aStream
+        super printOn:aStream
     ]
 
     "
@@ -2580,10 +2579,10 @@
 !Array class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.158 2013-04-04 07:55:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.160 2013-08-10 11:11:14 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.158 2013-04-04 07:55:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.160 2013-08-10 11:11:14 stefan Exp $'
 ! !