Anonymous user
Add a variable to a class instance at runtime: Difference between revisions
Add a variable to a class instance at runtime (view source)
Revision as of 21:49, 7 December 2020
, 3 years ago→{{header|Smalltalk}}: typo
m (→{{header|Smalltalk}}: typo) |
|||
Line 1,663:
p inspect. "shows 3 slots"
"Point class is unaffected:"
p2 := Point x
p2 z:40. -> error; Point does not implement z:
p2 inspect. "shows 2 slots"
|