26 lines
705 B
Text
26 lines
705 B
Text
( ( struktuur
|
|
= (aMember=) (aMethod=.!(its.aMember))
|
|
)
|
|
& new$struktuur:?object
|
|
& out$"Object as originally created:"
|
|
& lst$object
|
|
& A value:?(object..aMember)
|
|
& !object:(=?originalMembersAndMethods)
|
|
& new
|
|
$ (
|
|
' ( (anotherMember=)
|
|
(anotherMethod=.!(its.anotherMember))
|
|
()$originalMembersAndMethods
|
|
)
|
|
)
|
|
: ?object
|
|
& out
|
|
$ "
|
|
Object with additional member and method and with 'aMember' already set to some interesting value:"
|
|
& lst$object
|
|
& some other value:?(object..anotherMember)
|
|
& out$"
|
|
Call both methods and output their return values."
|
|
& out$("aMember contains:" (object..aMethod)$)
|
|
& out$("anotherMember contains:" (object..anotherMethod)$)
|
|
&);
|