Home Segments Index Top Previous Next

364: Mainline

To create a new dictionary, you simply send new to the Dictionary class:

Dictionary new 

To assign the new dictionary to a global variable, such as CalorieGramRatios, in the Smalltalk dictionary, you use an at:put: message:

Smalltalk at: #CalorieGramRatios put: Dictionary new