<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_FileOpenText</id>
		<title>Core Function FileOpenText - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_FileOpenText"/>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileOpenText&amp;action=history"/>
		<updated>2026-04-12T04:34:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileOpenText&amp;diff=5674&amp;oldid=prev</id>
		<title>UberFoX: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileOpenText&amp;diff=5674&amp;oldid=prev"/>
				<updated>2015-06-18T09:17:02Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:17, 18 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	// Read a 8 char&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	// Read a 8 char&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	say FileReadText($f, 'c', 8);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	say FileReadText($f, 'c', 8);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;	// Read to the end of the file&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;	say FileReadText($f, 'e');&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;// free the handle&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;// free the handle&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileOpenText&amp;diff=5673&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; FileOpenText( &lt;filename&gt; ) &lt;/pre&gt;  === Description ===  Opens a file for reading only (text files only) .  === Parameters ===  ==== filename  ====  Name of the text file to...&quot;</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileOpenText&amp;diff=5673&amp;oldid=prev"/>
				<updated>2015-06-18T09:16:26Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; FileOpenText( &amp;lt;filename&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Opens a file for reading only (text files only) .  === Parameters ===  ==== filename  ====  Name of the text file to...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
FileOpenText( &amp;lt;filename&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Opens a file for reading only (text files only) .&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== filename  ====&lt;br /&gt;
&lt;br /&gt;
Name of the text file to open.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns a text file &amp;quot;handle&amp;quot; for use with subsequent file functions&lt;br /&gt;
&lt;br /&gt;
Failure: Returns null if error occurs.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This does NOT return the same &amp;quot;handle&amp;quot; used by FileOpen() so you cannot use it in the same places as that however the following functions do support the handled returned from FileOpenText().&lt;br /&gt;
&lt;br /&gt;
FilePos(), FileSeek(), FileReadText()&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Open the file and return the handle&lt;br /&gt;
my $f = FileOpenText(&amp;quot;Main.spk&amp;quot;);&lt;br /&gt;
if ($f)&lt;br /&gt;
{&lt;br /&gt;
	// Read the first line&lt;br /&gt;
	say FileReadText($f, 'l');&lt;br /&gt;
	// Read the second line&lt;br /&gt;
	say FileReadText($f, 'l');&lt;br /&gt;
	// Read a char&lt;br /&gt;
	say FileReadText($f, 'c');&lt;br /&gt;
	// Read a 8 char&lt;br /&gt;
	say FileReadText($f, 'c', 8);&lt;br /&gt;
}&lt;br /&gt;
// free the handle&lt;br /&gt;
FileClose($f);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>