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

Content deleted Content added
Added PicoLisp
Line 258: Line 258:
$e->foo=1;
$e->foo=1;


$e->{"foo"} = 1; // using a runtime name</lang>
$e->{"foo"} = 1; // using a runtime name
$x = "foo";
$e->$x = 1; // using a runtime name in a variable</lang>


=={{header|PicoLisp}}==
=={{header|PicoLisp}}==