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

Content added Content deleted
(Latitude language added)
Line 758: Line 758:
Its value is 'rosetta'
Its value is 'rosetta'
</pre>
</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}}==
=={{header|Lingo}}==