runresult

runresult string

This agent interprets the given string as a NetLogo reporter and runs it, reporting the result obtained.

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 runresult on the same string over and over is much faster than running on different bits of code.

See also run.

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