This agent interprets the given string as a sequence of one or more NetLogo commands and runs them.
The code runs in the agent's current context, which means it has access to the values of local variables, "myself", and so on.
The code must be compiled first which takes time, however, compiled bits of code are cached by NetLogo and thus using run on the same string over and over is much faster than running on different bits of code.
See also runresult.
Note that you can't use run to define or redefine procedures.
Note that running code through run or runresult may be many times slower than running the same code directly.
Take me to the full NetLogo Dictionary