title: Is there a way to execute a text string as a command?
body: <p>In NetLogo is there a way to treat a text string as a command and execute it?</p>
  <p>In the simplest case - is there way to simply generate a text string like &quot;forward &quot; concatenated with a number I don't know till runtime, so i end up with a text variable equal to &quot;forward 8&quot;, say,  and then execute that command?</p>
  <p>My immediate need is probably what LOGO did,  namely, have the user click buttons to move a turtle around with the pen down to draw some shape, say a square,   saving those commands as they are written to an output window,  saving the full text of the output window to some named text like &quot;draw-square&quot;,  and then have the user able to type &quot;draw-square&quot; in the command center and have the turtle execute those steps and draw a new square.</p>
  <p>I could work around this I suppose by exporting the output to a myfile.nls text file,  then restarting NetLogo to bring in the new command file using the __includes [ &quot;myfile.nls&quot;] step , but I'd rather not ask them to do that if I can avoid it and in any case that wouldn't work over the web.</p>