<?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_FileReadText</id>
		<title>Core Function FileReadText - 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_FileReadText"/>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileReadText&amp;action=history"/>
		<updated>2026-04-12T02:17:40Z</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_FileReadText&amp;diff=5675&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; FileReadText( &lt;file&gt;, &lt;format&gt;, &lt;length&gt; ) &lt;/pre&gt;  === Description ===  Read text from a file opened by FileOpenText() using the format and length params .  === Parameters ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileReadText&amp;diff=5675&amp;oldid=prev"/>
				<updated>2015-06-18T09:19:56Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; FileReadText( &amp;lt;file&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;length&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Read text from a file opened by FileOpenText() using the format and length params .  === Parameters ...&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;
FileReadText( &amp;lt;file&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;length&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Read text from a file opened by FileOpenText() using the format and length params .&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
The text file &amp;quot;handle&amp;quot; to read from. (The one you got from FileOpenText())&lt;br /&gt;
&lt;br /&gt;
==== format ====&lt;br /&gt;
&lt;br /&gt;
Mode to read the choices are:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;c&amp;quot; = Read a single char&lt;br /&gt;
* &amp;quot;l&amp;quot; = Read a single line&lt;br /&gt;
* &amp;quot;e&amp;quot; = Read to the end of the file&lt;br /&gt;
&lt;br /&gt;
Note if you use &amp;quot;c&amp;quot; you may also supply a number of chars you wish to wish after it&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns the string containing hte information you asked for.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns an empty string.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
N/A&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;
	// Read to the end of the file&lt;br /&gt;
	say FileReadText($f, 'e');&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>