Dictionary a.k.a. Hash Table

From Cuis CookBook
Jump to navigation Jump to search
  • Way 1. This is the master way to do things dynamically via code.
d _ Dictionary new. 
d add: 1 -> 'one'. 
d add: 2 -> 'two'.
  • Way 2. This one is more practical if you need to insert many entries by hand.
d _ Dictionary newFromPairs: {
1. 'one'.
2. 'two'.
}