How can I find variables by name at runtime and set and get their values?
I have one edit where the user enters the name of a variable. (Assume the user enters the name of a variable that exists.) I need that the program finds the variable by name and returns the value. I would also like to change the value of the variable.
Here's an example with hypothetical function names:
// Display value of variable whose name is given by Edit1.Text
ShowMessage(GetValueOfVariable(Edit1.Text));
SetValueToVariable(Edit1.Text, 'NewValueToVariable'); //Set new value to variable.