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:22, 15 February 2019
, 5 years agoLatitude language added
Mercerenies (talk | contribs) (Latitude language added) |
|||
Line 758:
Its value is 'rosetta'
</pre>
=={{header|Latitude}}==
Latitude is prototype-oriented, so adding slots at runtime is very straightforward and common.
<lang Latitude>myObject := Object clone.
;; Name known at compile-time.
myObject foo := "bar".
;; Name known at runtime.
myObject slot 'foo = "bar".</lang>
=={{header|Lingo}}==
|