Add a variable to a class instance at runtime: Difference between revisions

No edit summary
Line 328:
#define extensions.
 
#class Extender :: BaseExtender
{
#field theObject.
#field theField.
Line 344 ⟶ 343:
theField := aValue.
]
#method => theObject.
}
 
Line 357 ⟶ 354:
anObject set &foo:"bar".
 
consoleExconsole writewriteLine:anObject:".foo=":(anObject foo).
 
console readChar.
].</lang>
{{out}}
<pre>
234.foo=bar
</pre>
 
=={{header|Falcon}}==
Anonymous user