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:41, 7 December 2020
, 3 years ago→{{header|Smalltalk}}
(Added Wren) |
|||
Line 1,667:
asks for adding variables to the class, not the instance.
CG: that comment refers to the Monkey code below - not the addSlot example.
<lang smalltalk>Object subclass: #Monkey
instanceVariableNames: 'aVar'
|