Add a variable to a class instance at runtime: Difference between revisions
Content added Content deleted
m (Moved jq entry into correct alphabetical order.) |
|||
Line 327:
ELENA does not support adding a field at run-time but it can be simulated with the help of a mix-in.
ELENA
<lang elena>import extensions
class Extender
{
prop object
constructor
theObject :=
}
public program()
{
var
// extending an object with a field
console
console
{{out}}
<pre>
|