[ |
main
| myVariable |
myVariable := 333.87 .
self printValue: myVariable.
" call ourself with message printValue: and pass myVariable as parameter "
!
printValue: val
" declaration of method printValue: which receives a paramter in the local variable val "
| localVar |
localVar := val description.
" call the message description on val "
Transcript showLine: ('value = ', localVar).
^self
" return our identification (could be any object) back to caller "
]