Jump to content
Ilias48rus

How to set reading and executing of string as code

Recommended Posts

String -> Code: Use compile.

Code -> String, Use string commands such as str or format. Might need to do some parsing.

  • Like 2

Share this post


Link to post
Share on other sites

its all here:

compile 

 

_string = "a = a + 1"; //define string with ur desired code

_code = compile _string;  // compile ur string to function

call _code; // call ur function to execute it (could also be spawned instead)

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×