Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
complexvalues [2019/01/04 16:21] christian [Using Values] |
complexvalues [2019/01/04 16:38] christian [Using Values] |
||
---|---|---|---|
Line 38: | Line 38: | ||
</ | </ | ||
- | And you can do: | + | Withit |
* create a value with <code smalltalk> | * create a value with <code smalltalk> | ||
- | * ask it for its parts <code smalltalk> | + | * ask for its parts <code smalltalk> |
- | * print the instance | + | * print it as code <code smalltalk> |
' | ' | ||
name: '' | name: '' | ||
Line 47: | Line 47: | ||
birthday: (Date d: 25 m: 6 y: 1960)' "</ | birthday: (Date d: 25 m: 6 y: 1960)' "</ | ||
* get the value from its code <code smalltalk> | * get the value from its code <code smalltalk> | ||
+ | * add fancy access methods like <code smalltalk> | ||
+ | weekdayAtBirth | ||
+ | ^self birthday weekday | ||
+ | </ | ||