Does Optoscript have something equivalent to an Eval() function? I haven’t been able to find anything.
For those unfamiliar, Eval lets you pass expressions or operators in a string, and act on them.
As an example, the old project I’ve taken over makes use of very generically named tables, Digi0, Digi1, Digi2, etc. Dozens upon dozens of them, and they have the same set of operations performed on them.
Currently it goes something like this:
Digi0 = 4;
Digi1 = 4;
Digi45 = 4;
Whereas with Eval, it would be much simpler:
for i = 0 to 45 step 1
eval ("Digi" + i + " = 4;");