<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=File.readLines</id>
	<title>File.readLines - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=File.readLines"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=File.readLines&amp;action=history"/>
	<updated>2026-04-10T15:05:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=File.readLines&amp;diff=1005&amp;oldid=prev</id>
		<title>SebNozzi: Change iteration over foods list directly instead of range of indexes</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=File.readLines&amp;diff=1005&amp;oldid=prev"/>
		<updated>2022-10-26T18:58:42Z</updated>

		<summary type="html">&lt;p&gt;Change iteration over foods list directly instead of range of indexes&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:58, 26 October 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot; &gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;else&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;else&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   print &amp;quot;My favorite foods are: &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   print &amp;quot;My favorite foods are: &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   for &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;i &lt;/del&gt;in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;range(0, &lt;/del&gt;foods&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.len-1)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   for &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;food &lt;/ins&gt;in foods&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     print &amp;quot;  &amp;quot; + &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;foods[i]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     print &amp;quot;  &amp;quot; + &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;food&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   end for&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   end for&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end if&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end if&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>SebNozzi</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=File.readLines&amp;diff=667&amp;oldid=prev</id>
		<title>Mantic: Initial file.readLines page.</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=File.readLines&amp;diff=667&amp;oldid=prev"/>
		<updated>2021-01-24T04:21:41Z</updated>

		<summary type="html">&lt;p&gt;Initial file.readLines page.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In [[Mini Micro]] and [[command-line MiniScript]], the &amp;lt;c&amp;gt;[[file]].readLines&amp;lt;/c&amp;gt; function reads a file into an array of strings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;c&amp;gt;file.readLines&amp;lt;/c&amp;gt; will return ''null'' on any file it cannot open or read.&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| filePath || an absolute or relative path of the file to be read.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See also: [[file.writeLines]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;fileName = &amp;quot;myfoods.txt&amp;quot;&lt;br /&gt;
foods = file.readLines(fileName)&lt;br /&gt;
&lt;br /&gt;
if foods == null then&lt;br /&gt;
  print &amp;quot;[&amp;quot; + fileName + &amp;quot;] cannot be read.&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
  print &amp;quot;My favorite foods are: &amp;quot;&lt;br /&gt;
  for i in range(0, foods.len-1)&lt;br /&gt;
    print &amp;quot;  &amp;quot; + foods[i]&lt;br /&gt;
  end for&lt;br /&gt;
end if&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;br /&gt;
[[Category:Command-Line MiniScript]]&lt;/div&gt;</summary>
		<author><name>Mantic</name></author>
		
	</entry>
</feed>