[{"data":1,"prerenderedAt":342},["ShallowReactive",2],{"/dict/set":3,"/dict/set-surround":331},{"id":4,"title":5,"body":6,"description":297,"extension":298,"meta":299,"navigation":318,"path":327,"seo":328,"stem":329,"__hash__":330},"content/dict/set.md","NetLogo Dictionary: set",{"type":7,"value":8,"toc":286},"minimark",[9],[10,11,16,35,62,68,71,106,109,174,180],"div",{"className":12,"id":14,"role":15},[13],"dict_entry","set","region",[17,18,20],"h3",{"id":19},"set10",[21,22,26,27],"a",{"href":23,"role":24,"ariaLabel":25},"#set","doc-noteref","Reference to set","\nset\n",[28,29,34],"span",{"className":30,"role":32,"ariaLabel":33},[31],"since","note","Since version","\n1.0\n",[36,37,41],"h4",{"id":38,"className":39},"set-variable-value",[40],"section-heading",[21,42,46],{"className":43,"href":45},[44],"section-anchor","#set-variable-value",[28,47,50],{"className":48},[49],"prim_example",[51,52,53,54,58,59],"p",{},"set ",[55,56,57],"em",{},"variable"," ",[55,60,61],{},"value",[51,63,64,65,67],{},"Sets ",[55,66,57],{}," to the given value.",[51,69,70],{},"Variable can be any of the following:",[72,73,74,78,81,84,87,103],"ul",{},[75,76,77],"li",{},"A global variable declared using “globals”",[75,79,80],{},"The global variable associated with a slider, switch, chooser,\nor input box.",[75,82,83],{},"A variable belonging to this agent",[75,85,86],{},"If this agent is a turtle, a variable belonging to the patch\nunder the turtle.",[75,88,89,90,102],{},"A local variable created by the ",[91,92,94],"primitive",{"displayText":93,"permalink":93},"let",[21,95,93],{"className":96,"dataDisplayText":93,"href":98,"rel":99,"target":101,"title":93},[97],"netlogo-wiki-link","/dictionary#let",[100],"noopener","_self"," command.",[75,104,105],{},"An input to the current procedure.",[51,107,108],{},"Example:",[110,111,112],"pre",{},[113,114,115,58,121,126,127,130,131,58,134,58,138,143,130,145,58,148,58,152,157,130,159,58,162,58,166,171,173],"code",{},[28,116,120],{"className":117},[118,119],"token","command","ask",[28,122,125],{"className":123},[118,124],"reporter","turtles"," [",[128,129],"br",{},"  ",[28,132,14],{"className":133},[118,119],[28,135,137],{"className":136},[118,124],"color",[28,139,142],{"className":140},[118,141],"constant","red",[128,144],{},[28,146,14],{"className":147},[118,119],[28,149,151],{"className":150},[118,124],"size",[28,153,156],{"className":154},[118,155],"number","2",[128,158],{},[28,160,14],{"className":161},[118,119],[28,163,165],{"className":164},[118,124],"shape",[28,167,170],{"className":168},[118,169],"string","\"arrow\"",[128,172],{},"]",[51,175,176,177,179],{},"You can also give a list of variable names as the first argument for ",[113,178,14],{}," and they will be assigned the values from a list given as the second argument. This can be particular useful when you want to calculate multiple values in a reporter procedure, as you can easily set multiple variables with the results. A runtime error will occur if the second argument is not a list value or if there are not enough values in the list for all the variables specified.",[110,181,182],{},[113,183,184,58,187,126,190,130,192,126,195,58,198,58,201,204,205,58,208,58,211,173,214,130,216,58,220,58,223,228,130,230,58,233,58,236,240,130,242,58,245,58,248,252,173,254,256,58,259,126,262,130,264,126,267,58,270,58,273,204,276,279,280,284,173],{},[28,185,120],{"className":186},[118,119],[28,188,125],{"className":189},[118,124],[128,191],{},[28,193,14],{"className":194},[118,119],[28,196,137],{"className":197},[118,124],[28,199,151],{"className":200},[118,124],[28,202,165],{"className":203},[118,124],"] [",[28,206,142],{"className":207},[118,141],[28,209,156],{"className":210},[118,155],[28,212,170],{"className":213},[118,169],[128,215],{},[28,217,219],{"className":218},[118,119],"show",[28,221,137],{"className":222},[118,124],[28,224,227],{"className":225},[118,226],"comment","; prints 15",[128,229],{},[28,231,219],{"className":232},[118,119],[28,234,151],{"className":235},[118,124],[28,237,239],{"className":238},[118,226],"; prints 2",[128,241],{},[28,243,219],{"className":244},[118,119],[28,246,165],{"className":247},[118,124],[28,249,251],{"className":250},[118,226],"; prints \"arrow\"",[128,253],{},[128,255],{},[28,257,120],{"className":258},[118,119],[28,260,125],{"className":261},[118,124],[128,263],{},[28,265,14],{"className":266},[118,119],[28,268,137],{"className":269},[118,124],[28,271,151],{"className":272},[118,124],[28,274,165],{"className":275},[118,124],[28,277,142],{"className":278},[118,141],"] ",[28,281,283],{"className":282},[118,226],"; causes a runtime error as we need at least 3 values in the list",[128,285],{},{"title":287,"searchDepth":288,"depth":289,"links":290},"",5,3,[291],{"id":19,"depth":289,"text":292,"children":293},"\nset\n\n1.0\n",[294],{"id":38,"depth":295,"text":296},4,"set variable value","Documentation for the set primitive.","md",{"source":300,"metadataOutputPath":301,"projectConfig":302,"language":310,"inheritFrom":319,"output":318,"version":303,"layout":320,"dictionaryDisplayName":321,"dictionaryHomeDirectory":322,"indexFileURI":323,"currentItemId":14,"currentItemLabel":14,"primRoot":324,"icon":325,"assetsRoot":326},"autogen/dict/set.md","content/dict/set.metadata.yaml",{"version":303,"projectRoot":304,"scanRoot":305,"outputRoot":306,"defaults":307,"engine":313,"partials":314,"dedupeIdenticalDiskWrites":318},"7.0.4",".","autogen","content",{"inheritFrom":308,"language":310,"output":311,"extension":298,"title":312,"version":303},[309],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":315,"extensions":316},[304],[317,298],"mustache",true,[309],"catalog","NetLogo Dictionary","/dictionary.html","/_index/dict.txt","dict","i-lucide-square-code","/home/runner/work/Helio/Helio/apps/docs/autogen","/dict/set",{"title":5,"description":297},"dict/set","oTAv-s_pK_Rukv0KehikoN6QX4ybTOWfOvRDiWD2jdw",[332,337],{"title":333,"path":334,"stem":335,"description":336},"NetLogo Dictionary: sentence","/dict/sentence","dict/sentence","Documentation for the sentence primitive.",{"title":338,"path":339,"stem":340,"description":341},"NetLogo Dictionary: set-current-directory","/dict/set-current-directory","dict/set-current-directory","Documentation for the set-current-directory primitive.",1777657836644]