我正在学习 Smalltalk,但我没有找到任何关于如何更改变量值的示例。我该怎么做?
Object subclass: test [
| testvar |
"setvalue [
Function to change value of variable 'testvar'
]"
getvalue [
^testvar
]
].
Test := test new.
"
How i can set value to testvar?
Transcript show: Test getvalue.
"