222 onto the argument aStream. Redefined to output index access." |
222 onto the argument aStream. Redefined to output index access." |
223 |
223 |
224 |index "{ Class: SmallInteger }"| |
224 |index "{ Class: SmallInteger }"| |
225 |
225 |
226 thisContext isRecursive ifTrue:[ |
226 thisContext isRecursive ifTrue:[ |
227 Transcript showCr:'Error: storeOn: of self referencing collection.'. |
227 Transcript showCR:'Error: storeOn: of self referencing collection.'. |
228 aStream nextPutAll:'#recursive'. |
228 aStream nextPutAll:'#recursive'. |
229 ^ self |
229 ^ self |
230 ]. |
230 ]. |
231 |
231 |
232 aStream nextPutAll:'(('; nextPutAll:self class name; nextPutAll:' new:'. |
232 aStream nextPutAll:'(('; nextPutAll:self class name; nextPutAll:' new:'. |
233 self size printOn:aStream. |
233 self size printOn:aStream. |
234 aStream nextPutAll:')'. |
234 aStream nextPutAll:')'. |
235 index := 1. |
235 index := 1. |
236 self do:[:element | |
236 self do:[:element | |
237 aStream nextPutAll:' at:'. index printOn:aStream. aStream nextPutAll:' put:('. |
237 aStream nextPutAll:' at:'. index printOn:aStream. aStream nextPutAll:' put:('. |
238 element storeOn:aStream. |
238 element storeOn:aStream. |
239 aStream nextPutAll:');'. |
239 aStream nextPutAll:');'. |
240 index := index + 1 |
240 index := index + 1 |
241 ]. |
241 ]. |
242 index > 1 ifTrue:[aStream nextPutAll:' yourself']. |
242 index > 1 ifTrue:[aStream nextPutAll:' yourself']. |
243 aStream nextPut:$) |
243 aStream nextPut:$) |
244 |
244 |
245 " |
245 " |
246 (Array with:(1@2) with:(1->2)) storeString |
246 (Array with:(1@2) with:(1->2)) storeString |
247 " |
247 " |
|
248 |
|
249 "Modified: 18.5.1996 / 15:37:30 / cg" |
248 ! ! |
250 ! ! |
249 |
251 |
250 !ArrayedCollection methodsFor:'resizing'! |
252 !ArrayedCollection methodsFor:'resizing'! |
251 |
253 |
252 grow:newSize |
254 grow:newSize |