[{"data":1,"prerenderedAt":337},["ShallowReactive",2],{"/dict/run":3,"/dict/run-surround":326},{"id":4,"title":5,"body":6,"description":292,"extension":293,"meta":294,"navigation":312,"path":322,"seo":323,"stem":324,"__hash__":325},"content/dict/run.md","NetLogo Dictionary: run",{"type":7,"value":8,"toc":281},"minimark",[9],[10,11,16,42,112,119,125,134,137,140,143,255],"div",{"className":12,"id":14,"role":15},[13],"dict_entry","run","region",[17,18,20,35],"h3",{"id":19},"run13runresult13",[21,22,26,27],"a",{"href":23,"role":24,"ariaLabel":25},"#run","doc-noteref","Reference to run","\nrun\n",[28,29,34],"span",{"className":30,"role":32,"ariaLabel":33},[31],"since","note","Since version","\n1.3\n",[21,36,38,39],{"href":23,"role":24,"ariaLabel":37},"Reference to runresult","\nrunresult\n",[28,40,34],{"className":41,"role":32,"ariaLabel":33},[31],[43,44,48],"h4",{"id":45,"className":46},"run-commandrun-command-input1-run-stringrunresult-reporterrunresult-reporter-input1-runresult-string",[47],"section-heading",[21,49,53,65,78,86,95,105],{"className":50,"href":52},[51],"section-anchor","#run-commandrun-command-input1-run-stringrunresult-reporterrunresult-reporter-input1-runresult-string",[28,54,57],{"className":55},[56],"prim_example",[58,59,60,61],"p",{},"run ",[62,63,64],"em",{},"command",[28,66,68],{"className":67},[56],[58,69,70,71,73,74,77],{},"(run ",[62,72,64],{}," ",[62,75,76],{},"input1"," …)",[28,79,81],{"className":80},[56],[58,82,60,83],{},[62,84,85],{},"string",[28,87,89],{"className":88},[56],[58,90,91,92],{},"runresult ",[62,93,94],{},"reporter",[28,96,98],{"className":97},[56],[58,99,100,101,73,103,77],{},"(runresult ",[62,102,94],{},[62,104,76],{},[28,106,108],{"className":107},[56],[58,109,91,110],{},[62,111,85],{},[58,113,114,115,118],{},"The ",[116,117,14],"code",{}," form expects the name of a command, an anonymous command,\nor a string containing commands. This agent then runs them.",[58,120,114,121,124],{},[116,122,123],{},"runresult"," form expects the name of a reporter, an anonymous reporter,\nor a string containing a reporter. This agent runs it and reports the result.",[58,126,127,128,130,131,133],{},"Note that you can’t use ",[116,129,14],{}," to define or redefine\nprocedures. If you care about performance, note that the code must\nbe compiled first which takes time. However, compiled bits of code\nare cached by NetLogo and thus using ",[116,132,14],{}," on the same\nstring over and over is much faster than running different strings.\nThe first run, though, will be many times slower than\nrunning the same code directly, or in an anonymous command.",[58,135,136],{},"Anonymous procedures are recommended over strings whenever possible.\n(An example of when you must use strings is if you accept pieces\nof code from the user of your model.)",[58,138,139],{},"Anonymous procedures may freely read and/or set local variables\nand procedure inputs. Trying to do the same with strings may\nor may not work and should not be relied on.",[58,141,142],{},"When using anonymous procedures, you can provide them with inputs,\nif you surround the entire call with parentheses. For example:",[144,145,146],"pre",{},[116,147,148,149,153,154,73,159,163,164,73,168,73,172,175,176,73,180,183,184,73,189,193,194,197,202,204,208,209,153,212,73,215,163,219,73,222,73,225,73,229,232,233,73,236,193,239,241,73,245,249,251],{},"(",[28,150,14],{"className":151},[152,64],"token"," [ [",[28,155,158],{"className":156},[152,157],"variable","turtle-count",[28,160,162],{"className":161},[152,157],"step-count","] ",[28,165,167],{"className":166},[152,94],"->",[28,169,171],{"className":170},[152,64],"crt",[28,173,158],{"className":174},[152,157]," [ ",[28,177,179],{"className":178},[152,64],"fd",[28,181,162],{"className":182},[152,157]," ] ] ",[28,185,188],{"className":186},[152,187],"number","10",[28,190,192],{"className":191},[152,187],"5",")",[195,196],"br",{},[28,198,201],{"className":199},[152,200],"comment",";; creates 10 turtles and move them forward 5 steps",[195,203],{},[28,205,207],{"className":206},[152,64],"show"," (",[28,210,123],{"className":211},[152,94],[28,213,21],{"className":214},[152,157],[28,216,218],{"className":217},[152,157],"b",[28,220,167],{"className":221},[152,94],[28,223,21],{"className":224},[152,157],[28,226,228],{"className":227},[152,94],"+",[28,230,218],{"className":231},[152,157]," ] ",[28,234,188],{"className":235},[152,187],[28,237,192],{"className":238},[152,187],[195,240],{},[28,242,244],{"className":243},[152,157],"=>",[28,246,248],{"className":247},[152,187],"15",[195,250],{},[28,252,254],{"className":253},[152,200],";; adds 10 and 5",[58,256,257,258,270,271,280],{},"See also ",[259,260,262],"primitive",{"displayText":261,"permalink":261},"foreach",[21,263,261],{"className":264,"dataDisplayText":261,"href":266,"rel":267,"target":269,"title":261},[265],"netlogo-wiki-link","/dictionary#foreach",[268],"noopener","_self",", ",[259,272,275],{"displayText":273,"permalink":274},"-> (anonymous procedure)","arrow",[21,276,273],{"className":277,"dataDisplayText":273,"href":278,"rel":279,"target":269,"title":273},[265],"/dictionary#arrow",[268],".",{"title":282,"searchDepth":283,"depth":284,"links":285},"",5,3,[286],{"id":19,"depth":284,"text":287,"children":288},"\nrun\n\n1.3\n\nrunresult\n\n1.3\n",[289],{"id":45,"depth":290,"text":291},4,"run command(run command input1 …)run stringrunresult reporter(runresult reporter input1 …)runresult string","Documentation for the run primitive.","md",{"source":295,"metadataOutputPath":296,"projectConfig":297,"language":304,"inheritFrom":313,"output":312,"version":298,"layout":314,"dictionaryDisplayName":315,"dictionaryHomeDirectory":316,"indexFileURI":317,"currentItemId":14,"currentItemLabel":318,"primRoot":319,"icon":320,"assetsRoot":321},"autogen/dict/run.md","content/dict/run.metadata.yaml",{"version":298,"projectRoot":280,"scanRoot":299,"outputRoot":300,"defaults":301,"engine":307,"partials":308,"dedupeIdenticalDiskWrites":312},"7.0.4","autogen","content",{"inheritFrom":302,"language":304,"output":305,"extension":293,"title":306,"version":298},[303],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":309,"extensions":310},[280],[311,293],"mustache",true,[303],"catalog","NetLogo Dictionary","/dictionary.html","/_index/dict.txt","run, runresult","dict","i-lucide-square-code","/home/runner/work/Helio/Helio/apps/docs/autogen","/dict/run",{"title":5,"description":292},"dict/run","nZvHK5ivB1HtqgV8lLCBXfpSbaOSfoQ8YBSawrbD2Yw",[327,332],{"title":328,"path":329,"stem":330,"description":331},"NetLogo Dictionary: round","/dict/round","dict/round","Documentation for the round primitive.",{"title":333,"path":334,"stem":335,"description":336},"NetLogo Dictionary: scale-color","/dict/scale-color","dict/scale-color","Documentation for the scale-color primitive.",1777657835906]