--- a/Dict.st Fri Apr 19 12:43:20 1996 +0200
+++ b/Dict.st Fri Apr 19 12:47:25 1996 +0200
@@ -195,30 +195,30 @@
at:aKey put:anObject
"add the argument anObject under key, aKey to the receiver.
-
+ Return anObject (sigh).
WARNING: do not add elements while iterating over the receiver.
- Iterate over a copy to do this."
+ Iterate over a copy to do this."
|index "{ Class: SmallInteger }" |
aKey isNil ifTrue:[
- "nil is not allowed as key"
- self errorInvalidKey:aKey
+ "nil is not allowed as key"
+ self errorInvalidKey:aKey
] ifFalse:[
- index := self findKeyOrNil:aKey.
- (valueArray basicAt:index) notNil ifTrue:[
- valueArray basicAt:index put:anObject.
- ^ anObject
- ].
- keyArray basicAt:index put:aKey.
- valueArray basicAt:index put:anObject.
- tally := tally + 1.
+ index := self findKeyOrNil:aKey.
+ (valueArray basicAt:index) notNil ifTrue:[
+ valueArray basicAt:index put:anObject.
+ ^ anObject
+ ].
+ keyArray basicAt:index put:aKey.
+ valueArray basicAt:index put:anObject.
+ tally := tally + 1.
- self fullCheck.
+ self fullCheck.
].
^ anObject
- "Modified: 1.3.1996 / 21:24:13 / cg"
+ "Modified: 19.4.1996 / 11:19:45 / cg"
!
keyAtEqualValue:aValue
@@ -1088,5 +1088,5 @@
!Dictionary class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/Dict.st,v 1.35 1996-04-09 20:50:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/Dict.st,v 1.36 1996-04-19 10:46:37 cg Exp $'
! !
--- a/Dictionary.st Fri Apr 19 12:43:20 1996 +0200
+++ b/Dictionary.st Fri Apr 19 12:47:25 1996 +0200
@@ -195,30 +195,30 @@
at:aKey put:anObject
"add the argument anObject under key, aKey to the receiver.
-
+ Return anObject (sigh).
WARNING: do not add elements while iterating over the receiver.
- Iterate over a copy to do this."
+ Iterate over a copy to do this."
|index "{ Class: SmallInteger }" |
aKey isNil ifTrue:[
- "nil is not allowed as key"
- self errorInvalidKey:aKey
+ "nil is not allowed as key"
+ self errorInvalidKey:aKey
] ifFalse:[
- index := self findKeyOrNil:aKey.
- (valueArray basicAt:index) notNil ifTrue:[
- valueArray basicAt:index put:anObject.
- ^ anObject
- ].
- keyArray basicAt:index put:aKey.
- valueArray basicAt:index put:anObject.
- tally := tally + 1.
+ index := self findKeyOrNil:aKey.
+ (valueArray basicAt:index) notNil ifTrue:[
+ valueArray basicAt:index put:anObject.
+ ^ anObject
+ ].
+ keyArray basicAt:index put:aKey.
+ valueArray basicAt:index put:anObject.
+ tally := tally + 1.
- self fullCheck.
+ self fullCheck.
].
^ anObject
- "Modified: 1.3.1996 / 21:24:13 / cg"
+ "Modified: 19.4.1996 / 11:19:45 / cg"
!
keyAtEqualValue:aValue
@@ -1088,5 +1088,5 @@
!Dictionary class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.35 1996-04-09 20:50:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.36 1996-04-19 10:46:37 cg Exp $'
! !
--- a/OrdColl.st Fri Apr 19 12:43:20 1996 +0200
+++ b/OrdColl.st Fri Apr 19 12:47:25 1996 +0200
@@ -86,16 +86,19 @@
!
at:anInteger put:anObject
- "set the element at index, to be anInteger"
+ "set the element at index, to be anInteger.
+ Return anObject (sigh)."
|idx|
idx := anInteger + firstIndex - 1.
((anInteger < 1) or:[idx > lastIndex]) ifTrue:[
- ^ self subscriptBoundsError:anInteger
+ ^ self subscriptBoundsError:anInteger
] ifFalse:[
- ^ contentsArray at:idx put:anObject
+ ^ contentsArray at:idx put:anObject
]
+
+ "Modified: 19.4.1996 / 11:31:16 / cg"
!
first
@@ -1301,5 +1304,5 @@
!OrderedCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/OrdColl.st,v 1.45 1996-04-13 12:21:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/OrdColl.st,v 1.46 1996-04-19 10:47:25 cg Exp $'
! !
--- a/OrderedCollection.st Fri Apr 19 12:43:20 1996 +0200
+++ b/OrderedCollection.st Fri Apr 19 12:47:25 1996 +0200
@@ -86,16 +86,19 @@
!
at:anInteger put:anObject
- "set the element at index, to be anInteger"
+ "set the element at index, to be anInteger.
+ Return anObject (sigh)."
|idx|
idx := anInteger + firstIndex - 1.
((anInteger < 1) or:[idx > lastIndex]) ifTrue:[
- ^ self subscriptBoundsError:anInteger
+ ^ self subscriptBoundsError:anInteger
] ifFalse:[
- ^ contentsArray at:idx put:anObject
+ ^ contentsArray at:idx put:anObject
]
+
+ "Modified: 19.4.1996 / 11:31:16 / cg"
!
first
@@ -1301,5 +1304,5 @@
!OrderedCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.45 1996-04-13 12:21:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.46 1996-04-19 10:47:25 cg Exp $'
! !