using collections
Paul Dufresne
dufrp at hotmail.com
Mon May 5 15:56:05 PDT 2003
I was to write about it:
In c@(Set traits) scanFor: obj, of set.slate, I changed
end: c array size.
to become: end: c array size -1.
But there was still a problem when the array doubles in size:
=========================================================
G:\slate>slate.fas
Slate 1> 'src/init.slate' fileIn.
Hi, there!
Nil
Slate 2> lobby addSlot: #p.
<WM: Namespacetraits, lobby, prototypes, globals, Mixins, p,><WM: *LOBBY*,
(trai
ts lobby prototypes globals Mixins p)>
Slate 3> p: Set copy.
<WM: _traits, tally, array, hashBlock, equalsBlock, Iterator,>
<WM: *PRIMITIVE-COLLECTION*, (traits tally array hashBlock equalsBlock
Iterator)>
Slate 4> p add: 4.
4
Slate 5> p array.
{Nil. Nil. Nil. Nil. Nil. Nil. Nil. 4. Nil. Nil}
Slate 6> p add: 555.
555
Slate 7> p array.
{Nil. Nil. 555. Nil. Nil. Nil. Nil. 4. Nil. Nil}
Slate 8> p size.
2
Slate 9> p add: 5.
5
Slate 10> p array.
{Nil. Nil. 555. Nil. Nil. Nil. Nil. 4. Nil. 5}
Slate 11> p add: 4.
4
Slate 12> p array.
{Nil. Nil. 555. Nil. Nil. Nil. Nil. 4. Nil. 5}
Slate 13> p add: 2001.
2001
Slate 14> p array.
{Nil. Nil. 555. Nil. Nil. 2001. Nil. 4. Nil. 5}
Slate 15> p add: 31.
31
Slate 16> p array.
{Nil. Nil. 555. Nil. Nil. 2001. Nil. 4. 31. 5}
Slate 17> p add: 35.
35
Slate 18> p array.
{Nil. Nil. 555. Nil. Nil. 2001. 35. 4. 31. 5}
Slate 19> p add: 3.
3
Slate 20> p array.
{3. Nil. 555. Nil. Nil. 2001. 35. 4. 31. 5}
Slate 21> p add: 36.
36
Slate 22> p array.
{3. 36. 555. Nil. Nil. 2001. 35. 4. 31. 5}
Slate 23> p add: 6.
6
Slate 24> p array.
{Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil.
Nil.
Nil. Nil. Nil. Nil}
Slate 25> p add: 34.
34
Slate 26> p array.
{Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. Nil. 34. Nil. Nil. Nil. Nil. Nil.
Nil.
Nil. Nil. Nil. Nil}
Slate 27> p size.
2
Slate 28> p capacity.
20
====================================================================
_________________________________________________________________
MSN Messenger : discutez en direct avec vos amis !
http://messenger.fr.msn.ca/
More information about the Slate
mailing list