[{"data":1,"prerenderedAt":300},["ShallowReactive",2],{"/dict/let":3,"/dict/let-surround":289},{"id":4,"title":5,"body":6,"description":256,"extension":257,"meta":258,"navigation":276,"path":285,"seo":286,"stem":287,"__hash__":288},"content/dict/let.md","NetLogo Dictionary: let",{"type":7,"value":8,"toc":245},"minimark",[9],[10,11,16,35,62,65,81,84,143,146],"div",{"className":12,"id":14,"role":15},[13],"dict_entry","let","region",[17,18,20],"h3",{"id":19},"let21",[21,22,26,27],"a",{"href":23,"role":24,"ariaLabel":25},"#let","doc-noteref","Reference to let","\nlet\n",[28,29,34],"span",{"className":30,"role":32,"ariaLabel":33},[31],"since","note","Since version","\n2.1\n",[36,37,41],"h4",{"id":38,"className":39},"let-variable-value",[40],"section-heading",[21,42,46],{"className":43,"href":45},[44],"section-anchor","#let-variable-value",[28,47,50],{"className":48},[49],"prim_example",[51,52,53,54,58,59],"p",{},"let ",[55,56,57],"em",{},"variable"," ",[55,60,61],{},"value",[51,63,64],{},"Creates a new local variable and gives it the given value. A local\nvariable is one that exists only within the enclosing block of\ncommands.",[51,66,67,68,80],{},"If you want to change the value afterwards, use ",[69,70,72],"primitive",{"displayText":71,"permalink":71},"set",[21,73,71],{"className":74,"dataDisplayText":71,"href":76,"rel":77,"target":79,"title":71},[75],"netlogo-wiki-link","/dictionary#set",[78],"noopener","_self",".",[51,82,83],{},"Example:",[85,86,87],"pre",{},[88,89,90,58,95,58,99,58,104,108,111,58,115,58,118,58,122,127,129,130,58,134,137,138,142],"code",{},[28,91,14],{"className":92},[93,94],"token","command",[28,96,98],{"className":97},[93,57],"prey",[28,100,103],{"className":101},[93,102],"reporter","one-of",[28,105,107],{"className":106},[93,57],"sheep-here",[109,110],"br",{},[28,112,114],{"className":113},[93,94],"if",[28,116,98],{"className":117},[93,57],[28,119,121],{"className":120},[93,102],"!=",[28,123,126],{"className":124},[93,125],"constant","nobody",[109,128],{},"  [ ",[28,131,133],{"className":132},[93,94],"ask",[28,135,98],{"className":136},[93,57]," [ ",[28,139,141],{"className":140},[93,94],"die"," ] ]",[51,144,145],{},"You can also create multiple local variables if you put the variable names in a list format. The values for the new variables will be taken from the 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 create multiple variables with the results. A runtime error will occur if you do not give a list of values or the list you provide doesn’t have enough values for all the variables.",[85,147,148],{},[88,149,150,153,154,58,158,58,162,166,167,58,172,58,176,180,181,183,58,187,58,190,195,197,58,200,58,203,207,209,58,212,58,215,219,221,223,153,226,58,229,58,233,166,237,240,241],{},[28,151,14],{"className":152},[93,94]," [",[28,155,157],{"className":156},[93,57],"x",[28,159,161],{"className":160},[93,57],"y",[28,163,165],{"className":164},[93,57],"z","] [",[28,168,171],{"className":169},[93,170],"number","10",[28,173,175],{"className":174},[93,170],"15",[28,177,179],{"className":178},[93,170],"20","]",[109,182],{},[28,184,186],{"className":185},[93,94],"show",[28,188,157],{"className":189},[93,57],[28,191,194],{"className":192},[93,193],"comment","; prints 10",[109,196],{},[28,198,186],{"className":199},[93,94],[28,201,161],{"className":202},[93,57],[28,204,206],{"className":205},[93,193],"; prints 15",[109,208],{},[28,210,186],{"className":211},[93,94],[28,213,165],{"className":214},[93,57],[28,216,218],{"className":217},[93,193],"; prints 20",[109,220],{},[109,222],{},[28,224,14],{"className":225},[93,94],[28,227,21],{"className":228},[93,57],[28,230,232],{"className":231},[93,57],"b",[28,234,236],{"className":235},[93,57],"c",[28,238,171],{"className":239},[93,170],"] ",[28,242,244],{"className":243},[93,193],"; causes a runtime error as we need at least 3 values in the list",{"title":246,"searchDepth":247,"depth":248,"links":249},"",5,3,[250],{"id":19,"depth":248,"text":251,"children":252},"\nlet\n\n2.1\n",[253],{"id":38,"depth":254,"text":255},4,"let variable value","Documentation for the let primitive.","md",{"source":259,"metadataOutputPath":260,"projectConfig":261,"language":268,"inheritFrom":277,"output":276,"version":262,"layout":278,"dictionaryDisplayName":279,"dictionaryHomeDirectory":280,"indexFileURI":281,"currentItemId":14,"currentItemLabel":14,"primRoot":282,"icon":283,"assetsRoot":284},"autogen/dict/let.md","content/dict/let.metadata.yaml",{"version":262,"projectRoot":80,"scanRoot":263,"outputRoot":264,"defaults":265,"engine":271,"partials":272,"dedupeIdenticalDiskWrites":276},"7.0.4","autogen","content",{"inheritFrom":266,"language":268,"output":269,"extension":257,"title":270,"version":262},[267],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":273,"extensions":274},[80],[275,257],"mustache",true,[267],"catalog","NetLogo Dictionary","/dictionary.html","/_index/dict.txt","dict","i-lucide-square-code","/home/runner/work/Helio/Helio/apps/docs/autogen","/dict/let",{"title":5,"description":256},"dict/let","mowBego03PvBW6mdY2F_NCpCZMdK0ETSELHJS17QZcE",[290,295],{"title":291,"path":292,"stem":293,"description":294},"NetLogo Dictionary: length","/dict/length","dict/length","Documentation for the length primitive.",{"title":296,"path":297,"stem":298,"description":299},"NetLogo Dictionary: link","/dict/link","dict/link","Documentation for the link primitive.",1777657818836]