Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
complexvalues [2019/01/04 16:50] christian [Anatomy of a Value] |
complexvalues [2019/01/04 16:56] christian [Using Values] |
||
---|---|---|---|
Line 38: | Line 38: | ||
</ | </ | ||
- | Withit | + | With it you can: |
* create a value with <code smalltalk> | * create a value with <code smalltalk> | ||
* ask for its parts <code smalltalk> | * ask for its parts <code smalltalk> | ||
Line 132: | Line 132: | ||
</ | </ | ||
- | After generating code with: <code smalltalk> | + | After generating code with: |
+ | <code smalltalk> | ||
+ | our example responds to #nickname : | ||
<code smalltalk> | <code smalltalk> | ||
Line 142: | Line 144: | ||
Person class>> | Person class>> | ||
</ | </ | ||
+ | |||
+ | Now you can specify a nickname: | ||
+ | <code smalltalk> | ||
+ | Person name: ' | ||
+ | </ | ||
+ | |||
+ | If you use the same parameter as the default, it is ignored | ||
+ | <code smalltalk> | ||
+ | Person name: ' | ||
+ | </ | ||
+ | because it is equal to | ||
+ | <code smalltalk> | ||
+ | Person name: ' | ||
+ | </ | ||
+ | |||
==== Get it ==== | ==== Get it ==== |