--- a/RunArray.st Tue Jul 18 12:18:23 2000 +0200
+++ b/RunArray.st Tue Jul 18 17:01:09 2000 +0200
@@ -726,41 +726,39 @@
otherContents = contentsArray ifTrue:[^ true].
idx1 := 1.
- runCount1 := contentsArray at:idx1.
- runValue1 := contentsArray at:idx1+1.
- idx1 := idx1+2.
+ runCount1 := 0.
idx2 := 1.
- runCount2 := otherContents at:idx2.
- runValue2 := otherContents at:idx2+1.
- idx2 := idx2+2.
+ runCount2 := 0.
[true] whileTrue:[
+ runCount1 == 0 ifTrue:[
+ idx1+1 > contentsArray size ifTrue:[
+ idx2+1 <= otherContents size ifTrue:[^ false].
+ runCount2 ~~ 0 ifTrue:[^ false].
+ ^ true.
+ ].
+ runCount1 := contentsArray at:idx1.
+ runValue1 := contentsArray at:idx1+1.
+ idx1 := idx1+2.
+ ].
+ runCount2 == 0 ifTrue:[
+ idx2+1 > otherContents size ifTrue:[
+ ^ false
+ ].
+ runCount2 := otherContents at:idx2.
+ runValue2 := otherContents at:idx2+1.
+ idx2 := idx2+2.
+ ].
+
runValue1 = runValue2 ifFalse:[^ false].
- runCount1 == runCount2 ifTrue:[
- idx1 := idx1 + 2.
- idx2 := idx2 + 2.
- idx1 > contentsArray size ifTrue:[
- idx2 > otherContents size ifTrue:[^ true].
- ^ false.
- ] ifFalse:[
- idx2 > otherContents size ifTrue:[^ false].
- ].
+ runCount1 > runCount2 ifTrue:[
+ runCount1 := runCount1 - runCount2.
+ runCount2 := 0.
] ifFalse:[
- runCount2 > runCount1 ifTrue:[
- runCount2 := runCount2 - runCount1.
- idx1+1 > contentsArray size ifTrue:[^ false].
- runCount1 := contentsArray at:idx1.
- runValue1 := contentsArray at:idx1+1.
- idx1 := idx1 + 2.
- ] ifFalse:[
- runCount1 := runCount1 - runCount2.
- idx2+1 > otherContents size ifTrue:[^ false].
- runCount2 := otherContents at:idx2.
- runValue2 := otherContents at:idx2+1.
- idx2 := idx2 + 2.
- ]
- ]
+ runCount2 := runCount2 - runCount1.
+ runCount1 := 0.
+ ].
].
"
@@ -1248,5 +1246,5 @@
!RunArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/RunArray.st,v 1.16 2000-07-17 10:47:10 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/RunArray.st,v 1.17 2000-07-18 15:01:09 cg Exp $'
! !