RosettaCodeData/Task/Dynamic-variable-names/Elena/dynamic-variable-names.elena
2023-10-02 18:11:16 -07:00

22 lines
463 B
Text

import system'dynamic;
import extensions;
class TestClass
{
object variables;
constructor()
{
variables := new DynamicStruct()
}
function()
{
auto prop := new MessageName(console.write:"Enter the variable name:".readLine());
(prop.setPropertyMessage())(variables,42);
console.printLine(prop.toPrintable(),"=",(prop.getPropertyMessage())(variables)).readChar()
}
}
public program = new TestClass();