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 15:35, 7 January 2019
, 5 years ago→{{header|Elena}}
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>
|