Troubleshooting
Evaluate a string to run a function?
Started by RufusWhite on .
Sign in or create an account to join the conversation.
Hi,
is there a way of running a script from a string - so for example at right now, I'm just using if():
Many thanks!
Rufus
is there a way of running a script from a string - so for example at right now, I'm just using if():
if (x) { pgm1(); }
else if (y) { pgm2(); }
else if (z) { pgm3(); }
whereas I'd prefer to do:evaluate('pgm' + currentPgm + '();');
is there a way of doing this?Many thanks!
Rufus