[{"data":1,"prerenderedAt":257},["ShallowReactive",2],{"/dict/file-read":3,"/dict/file-read-surround":246},{"id":4,"title":5,"body":6,"description":213,"extension":214,"meta":215,"navigation":233,"path":242,"seo":243,"stem":244,"__hash__":245},"content/dict/file-read.md","NetLogo Dictionary: file-read",{"type":7,"value":8,"toc":203},"minimark",[9],[10,11,16,35,51,54,57,73,95,177,187],"div",{"className":12,"id":14,"role":15},[13],"dict_entry","file-read","region",[17,18,20],"h3",{"id":19},"file-read20",[21,22,26,27],"a",{"href":23,"role":24,"ariaLabel":25},"#file-read","doc-noteref","Reference to file-read","\nfile-read\n",[28,29,34],"span",{"className":30,"role":32,"ariaLabel":33},[31],"since","note","Since version","\n2.0\n",[36,37,40],"h4",{"id":14,"className":38},[39],"section-heading",[21,41,44],{"className":42,"href":23},[43],"section-anchor",[28,45,48],{"className":46},[47],"prim_example",[49,50,14],"p",{},[49,52,53],{},"This reporter will read in the next constant from the opened file\nand interpret it as if it had been typed in the Command Center. It\nreports the resulting value. The result may be a number, list,\nstring, boolean, or the special value nobody.",[49,55,56],{},"Whitespace separates the constants. Each call to file-read will\nskip past both leading and trailing whitespace.",[49,58,59,60,72],{},"Note that strings need to have quotes around them. Use the command ",[61,62,64],"primitive",{"displayText":63,"permalink":63},"file-write",[21,65,63],{"href":66,"rel":67,"className":69,"dataDisplayText":63,"target":71,"title":63},"/dictionary#file-write",[68],"noopener",[70],"netlogo-wiki-link","_self"," to have quotes included.",[49,74,75,76,84,85,94],{},"Also note that the ",[61,77,79],{"displayText":78,"permalink":78},"file-open",[21,80,78],{"href":81,"rel":82,"className":83,"dataDisplayText":78,"target":71,"title":78},"/dictionary#file-open",[68],[70]," command must\nbe called before this reporter can be used, and there must be data\nremaining in the file. Use the reporter ",[61,86,89],{"displayText":87,"permalink":88},"file-at-end?","file-at-end",[21,90,87],{"href":91,"rel":92,"className":93,"dataDisplayText":87,"target":71,"title":87},"/dictionary#file-at-end",[68],[70]," to determine if you are at the end\nof the file.",[96,97,98],"pre",{},[99,100,101,106,107,112,115,106,119,106,123,106,127,132,134,139,141,106,146,150,152,106,155,106,159,162,164,168,170,106,173],"code",{},[28,102,78],{"className":103},[104,105],"token","command"," ",[28,108,111],{"className":109},[104,110],"string","\"my-file.data\"",[113,114],"br",{},[28,116,118],{"className":117},[104,105],"print",[28,120,14],{"className":121},[104,122],"reporter",[28,124,126],{"className":125},[104,122],"+",[28,128,131],{"className":129},[104,130],"number","5",[113,133],{},[28,135,138],{"className":136},[104,137],"comment",";; Next value is the number 1",[113,140],{},[28,142,145],{"className":143},[104,144],"variable","=>",[28,147,149],{"className":148},[104,130],"6",[113,151],{},[28,153,118],{"className":154},[104,105],[28,156,158],{"className":157},[104,122],"length",[28,160,14],{"className":161},[104,122],[113,163],{},[28,165,167],{"className":166},[104,137],";; Next value is the list [1 2 3 4]",[113,169],{},[28,171,145],{"className":172},[104,144],[28,174,176],{"className":175},[104,130],"4",[49,178,179,180,186],{},"Note: This primitive is not compatible with NetLogo Web. If you\nwish to read the contents of a file with the same code and the\nsame behavior in both NetLogo and NetLogo Web, see ",[21,181,185],{"href":182,"rel":183},"https://github.com/NetLogo/Fetch-Extension#readme",[184],"nofollow","fetch:user-file-async",".",[49,188,189,190,196,197,186],{},"See also ",[61,191,192],{"displayText":78,"permalink":78},[21,193,78],{"href":81,"rel":194,"className":195,"dataDisplayText":78,"target":71,"title":78},[68],[70]," and ",[61,198,199],{"displayText":63,"permalink":63},[21,200,63],{"href":66,"rel":201,"className":202,"dataDisplayText":63,"target":71,"title":63},[68],[70],{"title":204,"searchDepth":205,"depth":206,"links":207},"",5,3,[208],{"id":19,"depth":206,"text":209,"children":210},"\nfile-read\n\n2.0\n",[211],{"id":14,"depth":212,"text":14},4,"Documentation for the file-read primitive.","md",{"source":216,"metadataOutputPath":217,"projectConfig":218,"language":225,"inheritFrom":234,"output":233,"version":219,"layout":235,"dictionaryDisplayName":236,"dictionaryHomeDirectory":237,"indexFileURI":238,"currentItemId":14,"currentItemLabel":14,"primRoot":239,"icon":240,"assetsRoot":241},"autogen/dict/file-read.md","content/dict/file-read.metadata.yaml",{"version":219,"projectRoot":186,"scanRoot":220,"outputRoot":221,"defaults":222,"engine":228,"partials":229,"dedupeIdenticalDiskWrites":233},"7.0.4","autogen","content",{"inheritFrom":223,"language":225,"output":226,"extension":214,"title":227,"version":219},[224],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":230,"extensions":231},[186],[232,214],"mustache",true,[224],"catalog","NetLogo Dictionary","/dictionary.html","/_index/dict.txt","dict","i-lucide-square-code","/home/runner/work/Helio/Helio/apps/docs/autogen","/dict/file-read",{"title":5,"description":213},"dict/file-read","OwL1cA3jN8UwzJC8GndW9L67pNawgzrGneYkszaVKn8",[247,252],{"title":248,"path":249,"stem":250,"description":251},"NetLogo Dictionary: file-print","/dict/file-print","dict/file-print","Documentation for the file-print primitive.",{"title":253,"path":254,"stem":255,"description":256},"NetLogo Dictionary: file-read-characters","/dict/file-read-characters","dict/file-read-characters","Documentation for the file-read-characters primitive.",1777657808150]