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 11:10, 14 May 2022
, 2 years agoAdded Arturo implementation
m (Fixed XBS example) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 66:
I am Class with 1
</pre>
=={{header|Arturo}}==
<lang rebol>define :myClass [name,surname][]
myInstance: to :myClass ["John" "Doe"]
print myInstance
myInstance\age: 35
print myInstance</lang>
{{out}}
<pre>[name:John surname:Doe]
[name:John surname:Doe age:35]</pre>
=={{header|AutoHotkey}}==
|