<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://hotline.ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages</id>
		<title>Sputnik Wiki - New pages [en-gb]</title>
		<link rel="self" type="application/atom+xml" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages"/>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Special:NewPages"/>
		<updated>2026-04-05T14:43:42Z</updated>
		<subtitle>From Sputnik Wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_StrTr</id>
		<title>Core Function StrTr</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_StrTr"/>
				<updated>2015-09-19T18:46:19Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; StrTr( &amp;lt;str&amp;gt;, &amp;lt;from&amp;gt;, &amp;lt;to&amp;gt; ) StrTr( &amp;lt;str&amp;gt;, &amp;lt;replace_pairs&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  If given three arguments, this function returns a copy of str where all occurrence...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
StrTr( &amp;lt;str&amp;gt;, &amp;lt;from&amp;gt;, &amp;lt;to&amp;gt; )&lt;br /&gt;
StrTr( &amp;lt;str&amp;gt;, &amp;lt;replace_pairs&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
If given three arguments, this function returns a copy of str where all occurrences of each character in from have been translated to the corresponding character in to, i.e., every occurrence of $from[$n] has been replaced with $to[$n], where $n is a valid offset in both arguments.&lt;br /&gt;
&lt;br /&gt;
If from and to have different lengths, the extra characters in the longer of the two are ignored. The length of str will be the same as the return value's.&lt;br /&gt;
&lt;br /&gt;
If given two arguments, the second should be an array in the form array('from' =&amp;gt; 'to', ...). The return value is a string where all the occurrences of the array keys have been replaced by the corresponding values. The longest keys will be tried first. Once a substring has been replaced, its new value will not be searched again.&lt;br /&gt;
&lt;br /&gt;
In this case, the keys and the values may have any length, provided that there is no empty key; additionally, the length of the return value may differ from that of str. However, this function will be the most efficient when all the keys have the same size. &lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== str ====&lt;br /&gt;
&lt;br /&gt;
The string being translated.&lt;br /&gt;
&lt;br /&gt;
==== from ====&lt;br /&gt;
&lt;br /&gt;
The string being translated to to. &lt;br /&gt;
&lt;br /&gt;
==== to ====&lt;br /&gt;
&lt;br /&gt;
The string replacing from.&lt;br /&gt;
&lt;br /&gt;
==== replace_pairs ====&lt;br /&gt;
&lt;br /&gt;
The replace_pairs parameter may be used instead of to and from, in which case it's an array in the form array('from' =&amp;gt; 'to', ...).&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns the translated string.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns NULL&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Basic Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
say strtr(&amp;quot;Hilla Warld&amp;quot;,&amp;quot;ia&amp;quot;,&amp;quot;eo&amp;quot;);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Hello World&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace Pairs Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$trans = array(&amp;quot;h&amp;quot; =&amp;gt; &amp;quot;-&amp;quot;, &amp;quot;hello&amp;quot; =&amp;gt; &amp;quot;hi&amp;quot;, &amp;quot;hi&amp;quot; =&amp;gt; &amp;quot;hello&amp;quot;);&lt;br /&gt;
say strtr(&amp;quot;hi all, I said hello&amp;quot;, $trans);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// hello all, I said hi&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_TrimToNull</id>
		<title>Core Function TrimToNull</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_TrimToNull"/>
				<updated>2015-09-19T10:14:35Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; TrimToNull( &amp;lt;string&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Strip all zero chars (nulls) from the end of a string.  === Parameters ===  ==== string ====  The string to trim.  === R...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TrimToNull( &amp;lt;string&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Strip all zero chars (nulls) from the end of a string.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== string ====&lt;br /&gt;
&lt;br /&gt;
The string to trim.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns trimmed string.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns old string.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None.&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;
$Str = StrNew(@'\0', 15);&lt;br /&gt;
$Str[0] = 'A'; // Set first char to A&lt;br /&gt;
$Str[1] = 'B'; // Set second char to B&lt;br /&gt;
say $Str; // Prints: AB&lt;br /&gt;
say StrLen($Str); // 15&lt;br /&gt;
 &lt;br /&gt;
// Lets fix the string so its no longer 15 in size&lt;br /&gt;
// but fits all way to null term so 2 in size&lt;br /&gt;
say &amp;quot;Trimming...&amp;quot;;&lt;br /&gt;
$Str = TrimToNull($Str);&lt;br /&gt;
say $Str; // Prints: AB&lt;br /&gt;
say StrLen($Str); // 2&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_InStrRev</id>
		<title>Core Function InStrRev</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_InStrRev"/>
				<updated>2015-09-17T12:06:16Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Remarks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
InStrRev( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;casesense&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&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;
Same as InStr() but searches from right to left instead of left to right.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== string ====&lt;br /&gt;
&lt;br /&gt;
The string to evaluate.&lt;br /&gt;
&lt;br /&gt;
==== substring ====&lt;br /&gt;
&lt;br /&gt;
The substring to search for.&lt;br /&gt;
&lt;br /&gt;
==== ignoreCase ====&lt;br /&gt;
&lt;br /&gt;
Optional; Flag to indicate if the operations should be case insensitive.&lt;br /&gt;
&lt;br /&gt;
true = not case sensitive&lt;br /&gt;
&lt;br /&gt;
false = case sensitive&lt;br /&gt;
&lt;br /&gt;
Default: true&lt;br /&gt;
&lt;br /&gt;
==== occurrence ====&lt;br /&gt;
&lt;br /&gt;
Optional; Which occurrence of the substring to find in the string. Use a negative occurrence to search from the right side.&lt;br /&gt;
&lt;br /&gt;
The default value is 1 (finds first occurrence).&lt;br /&gt;
&lt;br /&gt;
==== start ====&lt;br /&gt;
&lt;br /&gt;
Optional; The starting position of the search.&lt;br /&gt;
&lt;br /&gt;
OR &lt;br /&gt;
&lt;br /&gt;
If the start is a negative value the character position will work backwards from the length of the string.&lt;br /&gt;
&lt;br /&gt;
Default: 0&lt;br /&gt;
&lt;br /&gt;
==== length ====&lt;br /&gt;
&lt;br /&gt;
Optional; The number of characters to search. By default the entire remainder of the string.&lt;br /&gt;
&lt;br /&gt;
If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes the position of this truncation or beyond, -1 will be returned.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns the position of the substring. &lt;br /&gt;
&lt;br /&gt;
Failure: Returns -1.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
The first character position is 0.&lt;br /&gt;
&lt;br /&gt;
You might think you set the start to say 10 (in a string of size 20) then expect InStrRev() to search backwards from that point but you will be mistaken as InStrRev() will search from the END of the string to the start you mentioned (10). To solve this issue you should set the start to 0 and the length to 10 then it will correctly search from position 10 to the start (0).&lt;br /&gt;
&lt;br /&gt;
This is because InStrRev() works similar to InStr() and SubStr() in how it handles start/length in that the start+length defines WHAT will be searched (the entire search content is defined in the start+length).&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;
$TestString = &amp;quot;the quick brown fox jumps over the lazy dog&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$TestNumber = InStrRev($TestString, &amp;quot;the&amp;quot;); // 31&lt;br /&gt;
say $TestNumber . &amp;quot; | &amp;quot; . substr($TestString, $TestNumber, 3);&lt;br /&gt;
&lt;br /&gt;
$TestNumber = InStrRev($TestString, &amp;quot;the&amp;quot;, true, 1, 0, 16); // 0&lt;br /&gt;
say $TestNumber . &amp;quot; | &amp;quot; . substr($TestString, $TestNumber, 3);&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 31 | the&lt;br /&gt;
// 0 | the&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_HasFlagAny</id>
		<title>Core Function HasFlagAny</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_HasFlagAny"/>
				<updated>2015-09-15T08:01:55Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
HasFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flags&amp;gt;... )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Check if any flag is enabled in a given enum instance.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== enumInst ====&lt;br /&gt;
&lt;br /&gt;
Instance of an enum (or any integer will do)&lt;br /&gt;
&lt;br /&gt;
==== flags ====&lt;br /&gt;
&lt;br /&gt;
One or more enum flags (or integers)&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true&lt;br /&gt;
&lt;br /&gt;
Failure: Returns false&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This is just an easier way to do bit flags.&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;
enum Options {&lt;br /&gt;
    $OPT_A = 0x01,&lt;br /&gt;
    $OPT_B = 0x02,&lt;br /&gt;
    $OPT_C = 0x04,&lt;br /&gt;
    $OPT_H = 0x08&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$opt = Options-&amp;gt;$OPT_A;&lt;br /&gt;
say &amp;quot;HasFlagAny 'A' or 'C' : &amp;quot; . HasFlagAny($opt, Options-&amp;gt;$OPT_A, Options-&amp;gt;$OPT_C);&lt;br /&gt;
say &amp;quot;HasFlagAny 'C' or 'B' : &amp;quot; . HasFlagAny($opt, Options-&amp;gt;$OPT_C, Options-&amp;gt;$OPT_B);&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// HasFlagAny 'A' or 'C' : true&lt;br /&gt;
// HasFlagAny 'C' or 'B' : false&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_SetFlag</id>
		<title>Core Function SetFlag</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_SetFlag"/>
				<updated>2015-09-15T07:49:51Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Remarks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SetFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt;, &amp;lt;state&amp;gt; ) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Enable or Disable a flag (or array of flags) in a given enum instance.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== enumInst ====&lt;br /&gt;
&lt;br /&gt;
Instance of an enum (or any integer will do)&lt;br /&gt;
&lt;br /&gt;
==== flag ====&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
&lt;br /&gt;
An enum flag (or any integer)&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
An array of enum flags.&lt;br /&gt;
&lt;br /&gt;
==== state ====&lt;br /&gt;
&lt;br /&gt;
Optional; The state to set the flag to should be a boolean of true or false.&lt;br /&gt;
&lt;br /&gt;
Default: true&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Returns the current value of the enumInst (a copy of it)&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This is just an easier way to do bit flags.&lt;br /&gt;
&lt;br /&gt;
This will not set a flag to a value it is already set to for example if you try enable a flag that's already enabled it will ignore the request (same goes for disabling a flag) this will ensure your enumInst doesn't get incorrect values even if you spam it.&lt;br /&gt;
&lt;br /&gt;
This modifies the original enumInst and it's return value can be ignored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Since SetFlag modifies the enumInst directly&lt;br /&gt;
// it can be used stand alone like this:&lt;br /&gt;
SetFlag($enumInst, $OPT_H, true); // modifies $enumInst on the spot&lt;br /&gt;
// This keeps your code cleaner since you do not&lt;br /&gt;
// need to do this:&lt;br /&gt;
$enumInst = SetFlag($enumInst, $OPT_H, true);&lt;br /&gt;
// since that would be rather pointless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
See [[Core Function HasFlag|HasFlag( )]] for examples.&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_HasFlag</id>
		<title>Core Function HasFlag</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_HasFlag"/>
				<updated>2015-09-15T07:48:19Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; HasFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Check if a flag (or array of flags) is enabled in a given enum instance.  === Parameters ===  ==== enumInst...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
HasFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Check if a flag (or array of flags) is enabled in a given enum instance.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== enumInst ====&lt;br /&gt;
&lt;br /&gt;
Instance of an enum (or any integer will do)&lt;br /&gt;
&lt;br /&gt;
==== flag ====&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
&lt;br /&gt;
An enum flag (or any integer)&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
An array of enum flags.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true&lt;br /&gt;
&lt;br /&gt;
Failure: Returns false&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This is just an easier way to do bit flags.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Basic example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum {&lt;br /&gt;
    $OPT_A = 0x01,&lt;br /&gt;
    $OPT_B = 0x02,&lt;br /&gt;
    $OPT_C = 0x04,&lt;br /&gt;
    $OPT_H = 0x08&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$opt = $OPT_A;&lt;br /&gt;
say &amp;quot;HasFlag 'A' : &amp;quot; . HasFlag($opt, $OPT_A);&lt;br /&gt;
say &amp;quot;HasFlag 'C' : &amp;quot; . HasFlag($opt, $OPT_C);&lt;br /&gt;
say &amp;quot;HasFlag 'H' : &amp;quot; . HasFlag($opt, $OPT_H);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Turning H on&amp;quot;;&lt;br /&gt;
SetFlag($opt, $OPT_H, true);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;HasFlag 'H' (again) : &amp;quot; . HasFlag($opt, $OPT_H);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Turning H off&amp;quot;;&lt;br /&gt;
SetFlag($opt, $OPT_H, false);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;HasFlag 'H' (again) : &amp;quot; . HasFlag($opt, $OPT_H);&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// HasFlag 'A' : true&lt;br /&gt;
// HasFlag 'C' : false&lt;br /&gt;
// HasFlag 'H' : false&lt;br /&gt;
// Turning H on&lt;br /&gt;
// HasFlag 'H' (again) : true&lt;br /&gt;
// Turning H off&lt;br /&gt;
// HasFlag 'H' (again) : false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Basic example using a literal enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Options {&lt;br /&gt;
    $OPT_A = 0x01,&lt;br /&gt;
    $OPT_B = 0x02,&lt;br /&gt;
    $OPT_C = 0x04,&lt;br /&gt;
    $OPT_H = 0x08&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$opt = Options-&amp;gt;$OPT_A;&lt;br /&gt;
say &amp;quot;HasFlag 'A' : &amp;quot; . HasFlag($opt, Options-&amp;gt;$OPT_A);&lt;br /&gt;
say &amp;quot;HasFlag 'C' : &amp;quot; . HasFlag($opt, Options-&amp;gt;$OPT_C);&lt;br /&gt;
say &amp;quot;HasFlag 'H' : &amp;quot; . HasFlag($opt, Options-&amp;gt;$OPT_H);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Turning H on&amp;quot;;&lt;br /&gt;
SetFlag($opt, Options-&amp;gt;$OPT_H, true);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;HasFlag 'H' (again) : &amp;quot; . HasFlag($opt, Options-&amp;gt;$OPT_H);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Turning H off&amp;quot;;&lt;br /&gt;
SetFlag($opt, Options-&amp;gt;$OPT_H, false);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;HasFlag 'H' (again) : &amp;quot; . HasFlag($opt, Options-&amp;gt;$OPT_H);&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// HasFlag 'A' : true&lt;br /&gt;
// HasFlag 'C' : false&lt;br /&gt;
// HasFlag 'H' : false&lt;br /&gt;
// Turning H on&lt;br /&gt;
// HasFlag 'H' (again) : true&lt;br /&gt;
// Turning H off&lt;br /&gt;
// HasFlag 'H' (again) : false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using arrays as the flags&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum {&lt;br /&gt;
    $OPT_A = 0x01,&lt;br /&gt;
    $OPT_B = 0x02,&lt;br /&gt;
    $OPT_C = 0x04,&lt;br /&gt;
    $OPT_H = 0x08&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$opt = $OPT_A;&lt;br /&gt;
say &amp;quot;HasFlag 'A' : &amp;quot; . HasFlag($opt, $OPT_A);&lt;br /&gt;
say &amp;quot;HasFlag 'C' : &amp;quot; . HasFlag($opt, $OPT_C);&lt;br /&gt;
say &amp;quot;HasFlag 'H' : &amp;quot; . HasFlag($opt, $OPT_H);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Turning H and C on&amp;quot;;&lt;br /&gt;
SetFlag($opt, array($OPT_H, $OPT_C));&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;HasFlag 'C' (again) : &amp;quot; . HasFlag($opt, $OPT_C);&lt;br /&gt;
say &amp;quot;HasFlag 'H' (again) : &amp;quot; . HasFlag($opt, $OPT_H);&lt;br /&gt;
say &amp;quot;HasFlag 'H AND C' (again) : &amp;quot; . HasFlag($opt, array($OPT_H, $OPT_C));&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Turning H and C off&amp;quot;;&lt;br /&gt;
SetFlag($opt, array($OPT_H, $OPT_C), false);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;HasFlag 'C' (again) : &amp;quot; . HasFlag($opt, $OPT_C);&lt;br /&gt;
say &amp;quot;HasFlag 'H' (again) : &amp;quot; . HasFlag($opt, $OPT_H);&lt;br /&gt;
say &amp;quot;HasFlag 'H AND C' (again) : &amp;quot; . HasFlag($opt, array($OPT_H, $OPT_C));&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Finally check A&amp;quot;;&lt;br /&gt;
say &amp;quot;HasFlag 'A' : &amp;quot; . HasFlag($opt, $OPT_A);&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// HasFlag 'A' : true&lt;br /&gt;
// HasFlag 'C' : false&lt;br /&gt;
// HasFlag 'H' : false&lt;br /&gt;
// Turning H and C on&lt;br /&gt;
// HasFlag 'C' (again) : true&lt;br /&gt;
// HasFlag 'H' (again) : true&lt;br /&gt;
// HasFlag 'H AND C' (again) : true&lt;br /&gt;
// Turning H and C off&lt;br /&gt;
// HasFlag 'C' (again) : false&lt;br /&gt;
// HasFlag 'H' (again) : false&lt;br /&gt;
// HasFlag 'H AND C' (again) : false&lt;br /&gt;
// Finally check A&lt;br /&gt;
// HasFlag 'A' : true&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_BinaryConcat</id>
		<title>Core Function BinaryConcat</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_BinaryConcat"/>
				<updated>2015-09-14T10:33:23Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
BinaryConcat( &amp;lt;destination/array&amp;gt;, &amp;lt;values&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Mass append a ton of Binary variables in an extremely fast and efficient way.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== destination/array ====&lt;br /&gt;
&lt;br /&gt;
IF this param is NOT an array then it expects a binary variable or something it can as such.&lt;br /&gt;
&lt;br /&gt;
IF this param IS an array then the element [0] must be a reference to a binary variable and [1] must be the separator as a binary variable or something that can be converted to it.&lt;br /&gt;
&lt;br /&gt;
==== values ====&lt;br /&gt;
&lt;br /&gt;
One of more values to be concatenated.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns false.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None.&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;
// Make a binary var we will concat onto it&lt;br /&gt;
my $a = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
// Make binary stuff to concat to it&lt;br /&gt;
my $b = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hehe&amp;quot;);&lt;br /&gt;
my $c = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Test&amp;quot;);&lt;br /&gt;
my $d = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Cat&amp;quot;);&lt;br /&gt;
my $e = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Dog&amp;quot;);&lt;br /&gt;
// Do the concat&lt;br /&gt;
BinaryConcat($a, $b, $c, $d, $e);&lt;br /&gt;
say $a;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// HelloHeheTestCatDog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the separator to do that we must use an array with first element referenced using &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Make a binary var we will concat onto it&lt;br /&gt;
my $a = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
// Make a binary var we will use as the separator&lt;br /&gt;
my $sep = Pack(&amp;quot;A*&amp;quot;, &amp;quot;, &amp;quot;);&lt;br /&gt;
// Make binary stuff to concat to it&lt;br /&gt;
my $b = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hehe&amp;quot;);&lt;br /&gt;
my $c = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Test&amp;quot;);&lt;br /&gt;
my $d = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Cat&amp;quot;);&lt;br /&gt;
my $e = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Dog&amp;quot;);&lt;br /&gt;
// Do the concat&lt;br /&gt;
BinaryConcat(array(&amp;amp;$a, $sep), $b, $c, $d, $e);&lt;br /&gt;
say $a;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Hello, Hehe, Test, Cat, Dog&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_OffsetCalc</id>
		<title>Core Function OffsetCalc</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_OffsetCalc"/>
				<updated>2015-09-04T22:07:50Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Return Value */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
OffsetCalc( &amp;lt;size&amp;gt;, &amp;lt;start&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;
Calculate the START and LENGTH of an array index.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The size of the array/string you wish to calculate the start/length from.&lt;br /&gt;
&lt;br /&gt;
==== start ====&lt;br /&gt;
&lt;br /&gt;
Optional; The position to start. (0 = first)&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
If the start is a negative value the position will work backwards from the *size*. &lt;br /&gt;
&lt;br /&gt;
Default: 0&lt;br /&gt;
&lt;br /&gt;
==== length ====&lt;br /&gt;
&lt;br /&gt;
Optional; The number to extract. By default the entire remainder.&lt;br /&gt;
&lt;br /&gt;
If count is given and is negative, then that many will be omitted from the *size* (after the start position has been calculated when a start is negative). If start denotes the position of this truncation or beyond, null is returned.&lt;br /&gt;
&lt;br /&gt;
=== Return Value === &lt;br /&gt;
&lt;br /&gt;
Success: A two element array with the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[0] = Start position (index)&lt;br /&gt;
[1] = Length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Failure: NULL&lt;br /&gt;
&lt;br /&gt;
=== Remarks === &lt;br /&gt;
&lt;br /&gt;
It works using same thing SubStr() uses so if start is negative it counts from end and so on etc this allows you to include the same offset calculation for start/length of things that Sputnik does for your own needs.&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;
my $Str = &amp;quot;UberFoX&amp;quot;;&lt;br /&gt;
my $diff = OffsetCalc(StrLen($Str), -3, 3);&lt;br /&gt;
say SubStr($Str, $diff[0], $diff[1]);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FoX&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_DiffCalc</id>
		<title>Core Function DiffCalc</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_DiffCalc"/>
				<updated>2015-09-04T21:59:29Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; DiffCalc( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;useDouble&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Calculate the difference between two values and return the diff type Same/Add/Sub with a raw diff wh...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
DiffCalc( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;useDouble&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Calculate the difference between two values and return the diff type Same/Add/Sub with a raw diff which can be added to the base value to make it become the second and a non-raw diff that must be added or subbed for first to become second&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== first ====&lt;br /&gt;
&lt;br /&gt;
The first value to calculate (source value).&lt;br /&gt;
&lt;br /&gt;
==== second ====&lt;br /&gt;
&lt;br /&gt;
The second value to calculate (destination value).&lt;br /&gt;
&lt;br /&gt;
==== useDouble ====&lt;br /&gt;
&lt;br /&gt;
Optional; If TRUE then the calculation will be made using Double instead of Int64&lt;br /&gt;
&lt;br /&gt;
Default: False&lt;br /&gt;
&lt;br /&gt;
=== Return Value === &lt;br /&gt;
&lt;br /&gt;
Success: A three element array with the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[0] = Type (Same/Add/Sub)&lt;br /&gt;
[1] = Difference (to be used with Type so if type if Sub you -= the difference &lt;br /&gt;
[2] = Raw Difference can be applied directly to the first value with += or -=&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks === &lt;br /&gt;
&lt;br /&gt;
None.&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;
// get a diff on double using the double flag&lt;br /&gt;
PrintDiff(100.0, 50.0, true);&lt;br /&gt;
// now get the diff on some ints&lt;br /&gt;
PrintDiff(0x411C88, 0x40230F);&lt;br /&gt;
PrintDiff(0x40230F, 0x411C88);&lt;br /&gt;
&lt;br /&gt;
Function PrintDiff($first, $second)&lt;br /&gt;
{&lt;br /&gt;
	// Get the diff&lt;br /&gt;
	my List($Type, $Diff, $RawDiff) = DiffCalc($first, $second);&lt;br /&gt;
	// Print its info&lt;br /&gt;
	say &amp;quot;Type: $Type | Diff: $Diff | RawDiff: $RawDiff&amp;quot;;&lt;br /&gt;
	// To make the second from first we do&lt;br /&gt;
	my $remade = $first + $RawDiff;&lt;br /&gt;
	say &amp;quot;Remade: &amp;quot; . $remade . &amp;quot; | InHex: &amp;quot; . Hex($remade);&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Type: Sub | Diff: 50 | RawDiff: -50&lt;br /&gt;
// Remade: 50 | InHex: 32&lt;br /&gt;
// Type: Sub | Diff: 63865 | RawDiff: -63865&lt;br /&gt;
// Remade: 4203279 | InHex: 40230F&lt;br /&gt;
// Type: Add | Diff: 63865 | RawDiff: 63865&lt;br /&gt;
// Remade: 4267144 | InHex: 411C88&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_VarList</id>
		<title>Core Function VarList</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_VarList"/>
				<updated>2015-06-23T12:55:11Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; VarList( &amp;lt;varScope/class&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Obtain information on all variables that exist in a given scope or class.  ==== &amp;lt;varScope/class&amp;gt; ====  A variable s...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
VarList( &amp;lt;varScope/class&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Obtain information on all variables that exist in a given scope or class.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;varScope/class&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
A variable scope (see [[Macros|Macros]]) or a class variable to scan for variables&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns array of all found variables (Their name and information NOT their content). &lt;br /&gt;
&lt;br /&gt;
Failure: Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This is useful to grav information about variables and see how things tick a bit.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Read all information about Local variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define an *object* based variable&lt;br /&gt;
my $fox = sbNew();&lt;br /&gt;
{&lt;br /&gt;
	// Define an *binary* based variable&lt;br /&gt;
	my $dog = bin();&lt;br /&gt;
	{&lt;br /&gt;
		// Define an *string* based variable&lt;br /&gt;
		my $cat = &amp;quot;meow&amp;quot;;&lt;br /&gt;
		// Define an *integer* based variable&lt;br /&gt;
		my $test = 777;&lt;br /&gt;
		// Get all local variables&lt;br /&gt;
		my $vList = VarList(@ScopeLocal);&lt;br /&gt;
		// Loop through and print their information&lt;br /&gt;
		foreach($vList as my $varName =&amp;gt; my $varInfo)&lt;br /&gt;
		{&lt;br /&gt;
			// Extract information using KEY based List() since&lt;br /&gt;
			// the information is stored in KEYS and not just pushed&lt;br /&gt;
			// onto the array&lt;br /&gt;
			my List(@$Type, @$Depth, @$VarScope, @$ScopeType) = $varInfo;&lt;br /&gt;
			say &amp;quot;### Variable '$varName' BELOW ###&amp;quot;;&lt;br /&gt;
			my $TypeStr = VarTypeToString($Type);&lt;br /&gt;
			my $VarScopeStr = VarScopeToString($VarScope);&lt;br /&gt;
			my $ScopeTypeStr = ScopeToString($ScopeType);&lt;br /&gt;
			say &amp;quot;Type '$Type' (as String '$TypeStr')&amp;quot;;&lt;br /&gt;
			if ($Type == @typeObject)&lt;br /&gt;
			{&lt;br /&gt;
				my $ObjType = $varInfo['ObjectType'];&lt;br /&gt;
				my $ObjTypeStr = VarObjTypeToString($ObjType);&lt;br /&gt;
				say &amp;quot;Object Type '$ObjType' (as String '$ObjTypeStr')&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			say &amp;quot;Depth '$Depth'&amp;quot;;&lt;br /&gt;
			say &amp;quot;VarScope '$VarScope' (as string '$VarScopeStr')&amp;quot;;&lt;br /&gt;
			say &amp;quot;ScopeType '$ScopeType' (as string '$ScopeTypeStr')&amp;quot;;&lt;br /&gt;
			say &amp;quot;### Variable '$varName' ABOVE ###&amp;quot;;&lt;br /&gt;
			say;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ### Variable 'cat' BELOW ###&lt;br /&gt;
// Type '14' (as String 'String')&lt;br /&gt;
// Depth '0'&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '3' (as string 'Block')&lt;br /&gt;
// ### Variable 'cat' ABOVE ###&lt;br /&gt;
//&lt;br /&gt;
// ### Variable 'test' BELOW ###&lt;br /&gt;
// Type '8' (as String 'Int64')&lt;br /&gt;
// Depth '0'&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '3' (as string 'Block')&lt;br /&gt;
// ### Variable 'test' ABOVE ###&lt;br /&gt;
//&lt;br /&gt;
// ### Variable 'varname' BELOW ###&lt;br /&gt;
// Type '1' (as String 'Null')&lt;br /&gt;
// Depth '0'&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '3' (as string 'Block')&lt;br /&gt;
// ### Variable 'varname' ABOVE ###&lt;br /&gt;
//&lt;br /&gt;
// ### Variable 'varinfo' BELOW ###&lt;br /&gt;
// Type '1' (as String 'Null')&lt;br /&gt;
// Depth '0'&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '3' (as string 'Block')&lt;br /&gt;
// ### Variable 'varinfo' ABOVE ###&lt;br /&gt;
//&lt;br /&gt;
// ### Variable 'dog' BELOW ###&lt;br /&gt;
// Type '17' (as String 'Binary')&lt;br /&gt;
// Depth '1'&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '3' (as string 'Block')&lt;br /&gt;
// ### Variable 'dog' ABOVE ###&lt;br /&gt;
//&lt;br /&gt;
// ### Variable 'fox' BELOW ###&lt;br /&gt;
// Type '20' (as String 'Object')&lt;br /&gt;
// Object Type '5' (as String 'Object')&lt;br /&gt;
// Depth '2'&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '1' (as string 'InterpInit')&lt;br /&gt;
// ### Variable 'fox' ABOVE ###&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read all information about Global variables&lt;br /&gt;
&lt;br /&gt;
Note that sometimes stuff will appear in Globals such as @argv and other things these are Sputnik internal Global variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some global variables&lt;br /&gt;
Global $cat = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
Global $dog = bin();&lt;br /&gt;
Global $fox = sbNew();&lt;br /&gt;
&lt;br /&gt;
// Get all global variables&lt;br /&gt;
my $vList = VarList(@ScopeGlobal);&lt;br /&gt;
// Loop through and print their information&lt;br /&gt;
foreach($vList as my $varName =&amp;gt; my $varInfo)&lt;br /&gt;
{&lt;br /&gt;
	// Extract information using KEY based List() since&lt;br /&gt;
	// the information is stored in KEYS and not just pushed&lt;br /&gt;
	// onto the array&lt;br /&gt;
	my List(@$Type, @$VarScope, @$ScopeType) = $varInfo;&lt;br /&gt;
	say &amp;quot;### Variable '$varName' BELOW ###&amp;quot;;&lt;br /&gt;
	my $TypeStr = VarTypeToString($Type);&lt;br /&gt;
	my $VarScopeStr = VarScopeToString($VarScope);&lt;br /&gt;
	my $ScopeTypeStr = ScopeToString($ScopeType);&lt;br /&gt;
	say &amp;quot;Type '$Type' (as String '$TypeStr')&amp;quot;;&lt;br /&gt;
	if ($Type == @typeObject)&lt;br /&gt;
	{&lt;br /&gt;
		my $ObjType = $varInfo['ObjectType'];&lt;br /&gt;
		my $ObjTypeStr = VarObjTypeToString($ObjType);&lt;br /&gt;
		say &amp;quot;Object Type '$ObjType' (as String '$ObjTypeStr')&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	say &amp;quot;VarScope '$VarScope' (as string '$VarScopeStr')&amp;quot;;&lt;br /&gt;
	say &amp;quot;ScopeType '$ScopeType' (as string '$ScopeTypeStr')&amp;quot;;&lt;br /&gt;
	say &amp;quot;### Variable '$varName' ABOVE ###&amp;quot;;&lt;br /&gt;
	say;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ### Variable '@argv' BELOW ###&lt;br /&gt;
// Type '19' (as String 'Array')&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '0' (as string 'None')&lt;br /&gt;
// ### Variable '@argv' ABOVE ###&lt;br /&gt;
// &lt;br /&gt;
// ### Variable 'cat' BELOW ###&lt;br /&gt;
// Type '14' (as String 'String')&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '0' (as string 'None')&lt;br /&gt;
// ### Variable 'cat' ABOVE ###&lt;br /&gt;
// &lt;br /&gt;
// ### Variable 'dog' BELOW ###&lt;br /&gt;
// Type '17' (as String 'Binary')&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '0' (as string 'None')&lt;br /&gt;
// ### Variable 'dog' ABOVE ###&lt;br /&gt;
// &lt;br /&gt;
// ### Variable 'fox' BELOW ###&lt;br /&gt;
// Type '20' (as String 'Object')&lt;br /&gt;
// Object Type '5' (as String 'Object')&lt;br /&gt;
// VarScope '2' (as string 'Local')&lt;br /&gt;
// ScopeType '0' (as string 'None')&lt;br /&gt;
// ### Variable 'fox' ABOVE ###&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Preprocessor</id>
		<title>Preprocessor</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Preprocessor"/>
				<updated>2015-06-22T12:39:08Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* #predef */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Preprocessor =&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
The Sputnik preprocessor scans source files and changes them based on special # defined stuff such as #if before sending the source to the parser to deal with.&lt;br /&gt;
&lt;br /&gt;
For any of these to work the # must be the FIRST thing on the line (white space is allowed).&lt;br /&gt;
&lt;br /&gt;
=== #include-once ===&lt;br /&gt;
&lt;br /&gt;
This is used to make a source file is only included once (regardless of how many other source files request its inclusion)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#include-once&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== #require-once ===&lt;br /&gt;
&lt;br /&gt;
This is used to make a source file is only required once (regardless of how many other source files request its inclusion)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#require-once&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== #include &amp;quot;???&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is used to make a source file get included directly in the current source file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;quot;OtherFile.spk&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Warning - You must make note that this will ALWAYS include the file at the TOP of the source code it does NOT include where you place the #include statement.&lt;br /&gt;
&lt;br /&gt;
So if you do this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
say &amp;quot;111&amp;quot;;&lt;br /&gt;
#include &amp;quot;OtherFile.spk&amp;quot;&lt;br /&gt;
say &amp;quot;222&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The console will print 111 then 222 THEN it will do the actions from the &amp;quot;OtherFile.spk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This means you should always place #include statements at the top of your file to keep it obvious where they are being included.&lt;br /&gt;
&lt;br /&gt;
Of course #include statements ARE included in ORDER for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
say &amp;quot;111&amp;quot;;&lt;br /&gt;
#include &amp;quot;OtherFile.spk&amp;quot;&lt;br /&gt;
#include &amp;quot;OtherFile2.spk&amp;quot;&lt;br /&gt;
#include &amp;quot;OtherFile3.spk&amp;quot;&lt;br /&gt;
#include &amp;quot;OtherFile4.spk&amp;quot;&lt;br /&gt;
say &amp;quot;222&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print 111 then 222 THEN it will execute the actions of &amp;quot;OtherFile.spk&amp;quot; followed byt &amp;quot;OtherFile2.spk&amp;quot; then &amp;quot;OtherFile3.spk&amp;quot; then &amp;quot;OtherFile4.spk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So order does matter.&lt;br /&gt;
&lt;br /&gt;
=== #predef ===&lt;br /&gt;
&lt;br /&gt;
This is used to pre define a variable for use with #if etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#predef $Test = true&lt;br /&gt;
#if ($Test)&lt;br /&gt;
	say &amp;quot;True&amp;quot;;&lt;br /&gt;
#else&lt;br /&gt;
	say &amp;quot;False&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
// PRINTS&lt;br /&gt;
// TRUE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also omit the = and let it assign true for you example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#predef $Test&lt;br /&gt;
#if ($Test)&lt;br /&gt;
	say &amp;quot;It is true&amp;quot;;&lt;br /&gt;
#else&lt;br /&gt;
	say &amp;quot;It is false&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
// PRINTS&lt;br /&gt;
// It is true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== #predefwipe ===&lt;br /&gt;
&lt;br /&gt;
Delete all previously assigned preprocessor variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#predef $Test = 11&lt;br /&gt;
#unpredef $Test&lt;br /&gt;
#if ($Test == 10)&lt;br /&gt;
	say &amp;quot;It is 10&amp;quot;;&lt;br /&gt;
#elsif ($Test == 11)&lt;br /&gt;
	say &amp;quot;It is 11&amp;quot;;&lt;br /&gt;
#else&lt;br /&gt;
	say &amp;quot;No idea what it is&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
// PRINTS&lt;br /&gt;
// No idea what it is&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== #unpredef ===&lt;br /&gt;
&lt;br /&gt;
Delete a previously assigned preprocessor variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#predef $Test = 11&lt;br /&gt;
#unpredef $Test&lt;br /&gt;
#if ($Test == 10)&lt;br /&gt;
	say &amp;quot;It is 10&amp;quot;;&lt;br /&gt;
#elsif ($Test == 11)&lt;br /&gt;
	say &amp;quot;It is 11&amp;quot;;&lt;br /&gt;
#else&lt;br /&gt;
	say &amp;quot;No idea what it is&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
// PRINTS&lt;br /&gt;
// No idea what it is&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== #if, #else, #elsif ===&lt;br /&gt;
&lt;br /&gt;
This is used to define a conditional statement in your code where you can decide to omit entire sections of your source code from ever being parsed (and thus not run) if the condition is not met.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#predef $Test = 11&lt;br /&gt;
#if ($Test == 10)&lt;br /&gt;
	say &amp;quot;It is 10&amp;quot;;&lt;br /&gt;
#elsif ($Test == 11)&lt;br /&gt;
	say &amp;quot;It is 11&amp;quot;;&lt;br /&gt;
#else&lt;br /&gt;
	say &amp;quot;No idea what it is&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
// PRINTS&lt;br /&gt;
// It is 11&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using #unpredef to delete a previously assigned preprocessor variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#predef $Test = 11&lt;br /&gt;
#unpredef $Test&lt;br /&gt;
#if ($Test == 10)&lt;br /&gt;
	say &amp;quot;It is 10&amp;quot;;&lt;br /&gt;
#elsif ($Test == 11)&lt;br /&gt;
	say &amp;quot;It is 11&amp;quot;;&lt;br /&gt;
#else&lt;br /&gt;
	say &amp;quot;No idea what it is&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
// PRINTS&lt;br /&gt;
// No idea what it is&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can check using the &amp;quot;#predef $varname&amp;quot; directly which will act like a boolean&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#predef $Test&lt;br /&gt;
#if ($Test)&lt;br /&gt;
	say &amp;quot;It is true&amp;quot;;&lt;br /&gt;
#else&lt;br /&gt;
	say &amp;quot;It is false&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
// PRINTS&lt;br /&gt;
// It is true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== #define ===&lt;br /&gt;
&lt;br /&gt;
This is used to create a Sputnik @Macro or a function etc.&lt;br /&gt;
&lt;br /&gt;
Lets define a string macro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#define Test &amp;quot;Hello&amp;quot;&lt;br /&gt;
say @Test;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define a static (static in terms of the string itself isnt parsed for variables etc) string macro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#define Test 'Hello'&lt;br /&gt;
say @Test;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define a boolean macro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#define Test true&lt;br /&gt;
say @Test;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define a char macro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#define Test @'A'&lt;br /&gt;
say @Test;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// A&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define an integer macro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#define Test 100&lt;br /&gt;
say @Test;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define a hex integer macro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#define Test 0x7A&lt;br /&gt;
say @Test;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 122&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define an floating point macro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
#define Test 100.77&lt;br /&gt;
say @Test;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 100.77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define a link to another function (an alias)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Make &amp;quot;Meep&amp;quot; become a link/alias to the &amp;quot;say&amp;quot; function&lt;br /&gt;
// To do this we must place TWO spaces after the first )&lt;br /&gt;
// otherwise Sputnik will not take note of this as a function&lt;br /&gt;
#define Meep()  say&lt;br /&gt;
// Call meep which will in turn call &amp;quot;say&amp;quot;&lt;br /&gt;
meep &amp;quot;hello&amp;quot;;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// hello&lt;br /&gt;
&lt;br /&gt;
// For a value to be a Function macro the following must be true:&lt;br /&gt;
// * It must start with an Identifier with ( ) such as MinValue()&lt;br /&gt;
// * There must be TWO yes 2 spaces after the ) of the MinValue()&lt;br /&gt;
// * There must be at least ONE character for the body immediately&lt;br /&gt;
//   after the two spaces&lt;br /&gt;
//&lt;br /&gt;
// This is how a function is defined&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets define to create a function in a shorthand way&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create the old C/C++ min/max functions using #define&lt;br /&gt;
// To do this we must place TWO spaces after the first )&lt;br /&gt;
// otherwise Sputnik will not take note of this as a function&lt;br /&gt;
#define c_min($a, $b)  ($a &amp;lt; $b ? $a : $b)&lt;br /&gt;
#define c_max($a, $b)  ($a &amp;gt; $b ? $a : $b)&lt;br /&gt;
// Try them out&lt;br /&gt;
say c_min(10, 20);&lt;br /&gt;
say c_max(10, 20);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 10&lt;br /&gt;
// 20&lt;br /&gt;
&lt;br /&gt;
// For a value to be a Function macro the following must be true:&lt;br /&gt;
// * It must start with an Identifier with ( ) such as c_min()&lt;br /&gt;
// * There must be TWO yes 2 spaces after the ) of the c_max()&lt;br /&gt;
// * Then there mustbe a ( followed by the function body code&lt;br /&gt;
// * and finally ended by a )&lt;br /&gt;
// * The function body does not return a return and a ; since that&lt;br /&gt;
// * Is placed automatically for you&lt;br /&gt;
//&lt;br /&gt;
// This is how a function is defined&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
N/A.&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_Unserialize</id>
		<title>Core Function Unserialize</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_Unserialize"/>
				<updated>2015-06-21T09:59:09Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; Unserialize( &amp;lt;string&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Convert a string (Created with Serialize()) into its original variable/class/array etc.  === Parameters ===  ==== strin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Unserialize( &amp;lt;string&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Convert a string (Created with Serialize()) into its original variable/class/array etc.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== string ====&lt;br /&gt;
&lt;br /&gt;
The string to unserialize back into a variable.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns new variable.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Go See [[Core Function Serialize|Serialize(  )]] for Remarks.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Go See [[Core Function Serialize|Serialize(  )]] for Examples.&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_Serialize</id>
		<title>Core Function Serialize</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_Serialize"/>
				<updated>2015-06-21T09:57:46Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Remarks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Serialize( &amp;lt;variable&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Convert a variable, array, class etc a string you can save to file or transfer over the internet.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== variable ====&lt;br /&gt;
&lt;br /&gt;
The variable to serialize.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns serialized variable.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This can be used as a very fast effective way to dump arrays/classes to a file and read it back later.&lt;br /&gt;
&lt;br /&gt;
It is faster than the JSON stuff however it is not as portable and will only work within Sputnik.&lt;br /&gt;
&lt;br /&gt;
To read this in another language you would need to first read it into Sputnik then dump it as JSON.&lt;br /&gt;
&lt;br /&gt;
It is worth noting that Sputniks serializer has been *finalized* and will not change in the future however new data types may be added to it making older versions of Sputnik unable to unserialize something from a newer version.&lt;br /&gt;
&lt;br /&gt;
The serializer in Sputnik shares some similarities with the one with PHP in terms of how it lays out the value this means simple types like *String* may convert to PHP but more complex types like Arrays etc will not.&lt;br /&gt;
&lt;br /&gt;
If you are unserializing a string that contains a class and a class with that name cannot be located it will create an instance of IncompleteClass instead you can check for this by doing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IsVarClass($a, 'IncompleteClass');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Serialize a string&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Make a value&lt;br /&gt;
$a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
// Serialize it&lt;br /&gt;
my $s = Serialize($a);&lt;br /&gt;
// Print the serialized&lt;br /&gt;
say $s;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// p:5:&amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Unserialize is&lt;br /&gt;
my $b = Unserialize($s);&lt;br /&gt;
// Print it&lt;br /&gt;
say $b;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Serialize a number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Make a value&lt;br /&gt;
$a = 777;&lt;br /&gt;
// Serialize it&lt;br /&gt;
my $s = Serialize($a);&lt;br /&gt;
// Print the serialized&lt;br /&gt;
say $s;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// l:777;&lt;br /&gt;
&lt;br /&gt;
// Unserialize is&lt;br /&gt;
my $b = Unserialize($s);&lt;br /&gt;
// Print it&lt;br /&gt;
say $b;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 777&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Serialize an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Make an array&lt;br /&gt;
// Note - You could include multiple arrays inside arrays and so on&lt;br /&gt;
$a = array(100, &amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;);&lt;br /&gt;
// Serialize it&lt;br /&gt;
my $s = Serialize($a);&lt;br /&gt;
// Print the serialized&lt;br /&gt;
say $s;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// a:l:3;l:0;l:3;i:0;:{l:0;l:100;l:1;p:3:&amp;quot;Cat&amp;quot;;l:2;p:3:&amp;quot;Dog&amp;quot;;}&lt;br /&gt;
&lt;br /&gt;
// Unserialize is&lt;br /&gt;
my $b = Unserialize($s);&lt;br /&gt;
// Print it&lt;br /&gt;
printr $b;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 100&lt;br /&gt;
//     [1] =&amp;gt; Cat&lt;br /&gt;
//     [2] =&amp;gt; Dog&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Serialize a class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Make a Class&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $cat;&lt;br /&gt;
	my $dog;&lt;br /&gt;
	// This function is called when you create a class&lt;br /&gt;
	Function __Construct($catGoes, $dogGoes)&lt;br /&gt;
	{&lt;br /&gt;
		$cat = $catGoes;&lt;br /&gt;
		$dog = $dogGoes;&lt;br /&gt;
		say &amp;quot;Class 'Test' made&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	// This function is called when you serialize a class&lt;br /&gt;
	Function __Sleep()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Class 'Test' sleeps&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	// This function is called when you unserialize a class&lt;br /&gt;
	Function __WakeUp()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Class 'Test' woken up&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
// Create class instance&lt;br /&gt;
$a = new Test('meow', 'woof');&lt;br /&gt;
// Serialize it&lt;br /&gt;
my $s = Serialize($a);&lt;br /&gt;
// Print the serialized&lt;br /&gt;
say $s;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// oc:p:4:&amp;quot;test&amp;quot;;{a:l:2;l:0;l:0;i:2;:{p:3:&amp;quot;cat&amp;quot;;p:4:&amp;quot;meow&amp;quot;;p:3:&amp;quot;dog&amp;quot;;p:4:&amp;quot;woof&amp;quot;;}}&lt;br /&gt;
&lt;br /&gt;
// Unserialize is&lt;br /&gt;
my $b = Unserialize($s);&lt;br /&gt;
// Print it&lt;br /&gt;
printr $b;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// test Class&lt;br /&gt;
// (&lt;br /&gt;
//     [cat] =&amp;gt; meow&lt;br /&gt;
//     [dog] =&amp;gt; woof&lt;br /&gt;
// )&lt;br /&gt;
&lt;br /&gt;
// Lets double check it worked by calling the classes variables&lt;br /&gt;
say &amp;quot;Cat goes? : &amp;quot; . $b-&amp;gt;$cat;&lt;br /&gt;
say &amp;quot;Dog goes? : &amp;quot; . $b-&amp;gt;$dog;&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Cat goes? : meow&lt;br /&gt;
// Dog goes? : woof&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_LineInfo</id>
		<title>Core Function LineInfo</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_LineInfo"/>
				<updated>2015-06-21T09:43:56Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
LineInfo( )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Get a vast amount of *behind the scene* information the current line of source code being executed.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns an array of information. &lt;br /&gt;
&lt;br /&gt;
Failure: Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
More information will be added as time goes by but the array should remain in same format and provide the same info in future versions so it should be safe to rely on it.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Note I used LineInfo with a bit more stuff commented out above it so thats why the line is saying 6 instead of 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Get the line info&lt;br /&gt;
printr LineInfo();&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [SymbolName] =&amp;gt; Normal Stm&lt;br /&gt;
//     [SymbolKind] =&amp;gt; 0&lt;br /&gt;
//     [SymbolKindStr] =&amp;gt; Nonterminal&lt;br /&gt;
//     [SymbolXmlName] =&amp;gt; NormalStm&lt;br /&gt;
//     [SymbolIndex] =&amp;gt; 199&lt;br /&gt;
//     [SymbolInfo] =&amp;gt; &amp;lt;Normal Stm&amp;gt;&lt;br /&gt;
//     [PositionFileName] =&amp;gt; f:\sputnik\bin\main.spk&lt;br /&gt;
//     [PositionColumn] =&amp;gt; 1&lt;br /&gt;
//     [PositionIndex] =&amp;gt; 72&lt;br /&gt;
//     [PositionLine] =&amp;gt; 6&lt;br /&gt;
//     [PositionLineText] =&amp;gt; printr LineInfo();&lt;br /&gt;
//     [PositionText] =&amp;gt; printr&lt;br /&gt;
//     [PositionInfo] =&amp;gt; 6:1&lt;br /&gt;
// )&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_ClassInfo</id>
		<title>Core Function ClassInfo</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_ClassInfo"/>
				<updated>2015-06-21T09:32:15Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; ClassInfo( &amp;lt;class-name&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Get a vast amount of *behind the scene* information on a class and its functions, properties and so on.  ==== class-n...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ClassInfo( &amp;lt;class-name&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Get a vast amount of *behind the scene* information on a class and its functions, properties and so on.&lt;br /&gt;
&lt;br /&gt;
==== class-name ====&lt;br /&gt;
&lt;br /&gt;
The class name to get information on.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns an array of information. &lt;br /&gt;
&lt;br /&gt;
Failure: Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
More information will be added as time goes by but the array should remain in same format and provide the same info in future versions so it should be safe to rely on it.&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;
// Create a class&lt;br /&gt;
Class Pay&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Extend it&lt;br /&gt;
Class Tay extends Pay&lt;br /&gt;
{&lt;br /&gt;
	my $cat { get {} set {} }&lt;br /&gt;
	$dog { get{} }&lt;br /&gt;
	Static Function Moo($hmm = &amp;quot;lol&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
	Function hehe($hello)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Print the information on it&lt;br /&gt;
printr ClassInfo('Tay');&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [IsDisposed] =&amp;gt; false&lt;br /&gt;
//     [Visited] =&amp;gt; false&lt;br /&gt;
//     [Id] =&amp;gt; 6&lt;br /&gt;
//     [Base] =&amp;gt; Array&lt;br /&gt;
//         (&lt;br /&gt;
//             [Id] =&amp;gt; tay&lt;br /&gt;
//             [IdOrig] =&amp;gt; Tay&lt;br /&gt;
//             [HasRule] =&amp;gt; false&lt;br /&gt;
//             [IsRule] =&amp;gt; false&lt;br /&gt;
//             [InheritedCount] =&amp;gt; 1&lt;br /&gt;
//             [Inherited] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                     [0] =&amp;gt; pay&lt;br /&gt;
//                 )&lt;br /&gt;
//             [FunctionCount] =&amp;gt; 1&lt;br /&gt;
//             [Functions] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                     [0] =&amp;gt; Array&lt;br /&gt;
//                         (&lt;br /&gt;
//                             [Id] =&amp;gt; hehe&lt;br /&gt;
//                             [IdOrig] =&amp;gt; hehe&lt;br /&gt;
//                             [ParamCount] =&amp;gt; 1&lt;br /&gt;
//                             [Params] =&amp;gt; Array&lt;br /&gt;
//                                 (&lt;br /&gt;
//                                     [0] =&amp;gt; Array&lt;br /&gt;
//                                         (&lt;br /&gt;
//                                             [Type] =&amp;gt; SV&lt;br /&gt;
//                                             [HasObjectId] =&amp;gt; false&lt;br /&gt;
//                                             [HasDefault] =&amp;gt; false&lt;br /&gt;
//                                             [Name] =&amp;gt; hello&lt;br /&gt;
//                                         )&lt;br /&gt;
//                                 )&lt;br /&gt;
//                             [UseArgVariable] =&amp;gt; false&lt;br /&gt;
//                             [ReturnType] =&amp;gt; 0&lt;br /&gt;
//                             [Scope] =&amp;gt; Public&lt;br /&gt;
//                             [IsAbstract] =&amp;gt; false&lt;br /&gt;
//                             [IsOverride] =&amp;gt; false&lt;br /&gt;
//                             [AddOnce] =&amp;gt; false&lt;br /&gt;
//                             [RuleCount] =&amp;gt; 0&lt;br /&gt;
//                             [Rules] =&amp;gt; Array&lt;br /&gt;
//                                 (&lt;br /&gt;
//                                 )&lt;br /&gt;
//                         )&lt;br /&gt;
//                 )&lt;br /&gt;
//             [StaticFunctionCount] =&amp;gt; 1&lt;br /&gt;
//             [StaticFunctions] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                     [0] =&amp;gt; Array&lt;br /&gt;
//                         (&lt;br /&gt;
//                             [Id] =&amp;gt; moo&lt;br /&gt;
//                             [IdOrig] =&amp;gt; Moo&lt;br /&gt;
//                             [ParamCount] =&amp;gt; 1&lt;br /&gt;
//                             [Params] =&amp;gt; Array&lt;br /&gt;
//                                 (&lt;br /&gt;
//                                     [0] =&amp;gt; Array&lt;br /&gt;
//                                         (&lt;br /&gt;
//                                             [Type] =&amp;gt; SV&lt;br /&gt;
//                                             [HasObjectId] =&amp;gt; false&lt;br /&gt;
//                                             [HasDefault] =&amp;gt; true&lt;br /&gt;
//                                             [Name] =&amp;gt; hmm&lt;br /&gt;
//                                         )&lt;br /&gt;
//                                 )&lt;br /&gt;
//                             [UseArgVariable] =&amp;gt; false&lt;br /&gt;
//                             [ReturnType] =&amp;gt; 0&lt;br /&gt;
//                             [Scope] =&amp;gt; Public&lt;br /&gt;
//                             [IsAbstract] =&amp;gt; false&lt;br /&gt;
//                             [IsOverride] =&amp;gt; false&lt;br /&gt;
//                             [AddOnce] =&amp;gt; false&lt;br /&gt;
//                             [RuleCount] =&amp;gt; 0&lt;br /&gt;
//                             [Rules] =&amp;gt; Array&lt;br /&gt;
//                                 (&lt;br /&gt;
//                                 )&lt;br /&gt;
//                         )&lt;br /&gt;
//                 )&lt;br /&gt;
//             [OperatorCount] =&amp;gt; 0&lt;br /&gt;
//             [Operators] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                 )&lt;br /&gt;
//             [PropertyCount] =&amp;gt; 2&lt;br /&gt;
//             [Properties] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                     [0] =&amp;gt; Array&lt;br /&gt;
//                         (&lt;br /&gt;
//                             [Name] =&amp;gt; cat&lt;br /&gt;
//                             [NameOrig] =&amp;gt; cat&lt;br /&gt;
//                             [Scope] =&amp;gt; Any&lt;br /&gt;
//                             [IsAbstract] =&amp;gt; false&lt;br /&gt;
//                             [Visited] =&amp;gt; false&lt;br /&gt;
//                             [HasGet] =&amp;gt; true&lt;br /&gt;
//                             [HasSet] =&amp;gt; true&lt;br /&gt;
//                             [Get] =&amp;gt; Array&lt;br /&gt;
//                                 (&lt;br /&gt;
//                                     [ParamCount] =&amp;gt; 1&lt;br /&gt;
//                                     [Function] =&amp;gt; Array&lt;br /&gt;
//                                         (&lt;br /&gt;
//                                             [Id] =&amp;gt; propset&lt;br /&gt;
//                                             [IdOrig] =&amp;gt; PropSet&lt;br /&gt;
//                                             [ParamCount] =&amp;gt; 1&lt;br /&gt;
//                                             [Params] =&amp;gt; Array&lt;br /&gt;
//                                                 (&lt;br /&gt;
//                                                     [0] =&amp;gt; Array&lt;br /&gt;
//                                                         (&lt;br /&gt;
//                                                             [Type] =&amp;gt; SV&lt;br /&gt;
//                                                             [HasObjectId] =&amp;gt; false&lt;br /&gt;
//                                                             [HasDefault] =&amp;gt; false&lt;br /&gt;
//                                                             [Name] =&amp;gt; value&lt;br /&gt;
//                                                         )&lt;br /&gt;
//                                                 )&lt;br /&gt;
//                                             [UseArgVariable] =&amp;gt; false&lt;br /&gt;
//                                             [ReturnType] =&amp;gt; 0&lt;br /&gt;
//                                             [Scope] =&amp;gt; Public&lt;br /&gt;
//                                             [IsAbstract] =&amp;gt; false&lt;br /&gt;
//                                             [IsOverride] =&amp;gt; false&lt;br /&gt;
//                                             [AddOnce] =&amp;gt; false&lt;br /&gt;
//                                             [RuleCount] =&amp;gt; 0&lt;br /&gt;
//                                             [Rules] =&amp;gt; Array&lt;br /&gt;
//                                                 (&lt;br /&gt;
//                                                 )&lt;br /&gt;
//                                         )&lt;br /&gt;
//                                 )&lt;br /&gt;
//                         )&lt;br /&gt;
//                     [1] =&amp;gt; Array&lt;br /&gt;
//                         (&lt;br /&gt;
//                             [Name] =&amp;gt; dog&lt;br /&gt;
//                             [NameOrig] =&amp;gt; dog&lt;br /&gt;
//                             [Scope] =&amp;gt; Any&lt;br /&gt;
//                             [IsAbstract] =&amp;gt; false&lt;br /&gt;
//                             [Visited] =&amp;gt; false&lt;br /&gt;
//                             [HasGet] =&amp;gt; true&lt;br /&gt;
//                             [HasSet] =&amp;gt; false&lt;br /&gt;
//                             [Get] =&amp;gt; Array&lt;br /&gt;
//                                 (&lt;br /&gt;
//                                     [ParamCount] =&amp;gt; 0&lt;br /&gt;
//                                     [Function] =&amp;gt; Array&lt;br /&gt;
//                                         (&lt;br /&gt;
//                                             [Id] =&amp;gt; propget&lt;br /&gt;
//                                             [IdOrig] =&amp;gt; PropGet&lt;br /&gt;
//                                             [ParamCount] =&amp;gt; 0&lt;br /&gt;
//                                             [Params] =&amp;gt; Array&lt;br /&gt;
//                                                 (&lt;br /&gt;
//                                                 )&lt;br /&gt;
//                                             [UseArgVariable] =&amp;gt; false&lt;br /&gt;
//                                             [ReturnType] =&amp;gt; 0&lt;br /&gt;
//                                             [Scope] =&amp;gt; Public&lt;br /&gt;
//                                             [IsAbstract] =&amp;gt; false&lt;br /&gt;
//                                             [IsOverride] =&amp;gt; false&lt;br /&gt;
//                                             [AddOnce] =&amp;gt; false&lt;br /&gt;
//                                             [RuleCount] =&amp;gt; 0&lt;br /&gt;
//                                             [Rules] =&amp;gt; Array&lt;br /&gt;
//                                                 (&lt;br /&gt;
//                                                 )&lt;br /&gt;
//                                         )&lt;br /&gt;
//                                 )&lt;br /&gt;
//                         )&lt;br /&gt;
//                 )&lt;br /&gt;
//         )&lt;br /&gt;
// )&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FunctionInfo</id>
		<title>Core Function FunctionInfo</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FunctionInfo"/>
				<updated>2015-06-21T09:29:09Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
FunctionInfo( &amp;lt;function-name&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Get a vast amount of *behind the scene* information on a function.&lt;br /&gt;
&lt;br /&gt;
==== function-name ====&lt;br /&gt;
&lt;br /&gt;
The function name to get information on.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns an array of information. &lt;br /&gt;
&lt;br /&gt;
Failure: Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
More information will be added as time goes by but the array should remain in same format and provide the same info in future versions so it should be safe to rely on it.&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;
// make a function&lt;br /&gt;
Function cat($cat = &amp;quot;dog&amp;quot;, &amp;amp;$dog, $fox)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Print information about the function&lt;br /&gt;
printr FunctionInfo('cat');&lt;br /&gt;
&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [Id] =&amp;gt; cat&lt;br /&gt;
//     [IdOrig] =&amp;gt; cat&lt;br /&gt;
//     [ParamCount] =&amp;gt; 3&lt;br /&gt;
//     [Params] =&amp;gt; Array&lt;br /&gt;
//         (&lt;br /&gt;
//             [0] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                     [Type] =&amp;gt; SV&lt;br /&gt;
//                     [HasObjectId] =&amp;gt; false&lt;br /&gt;
//                     [HasDefault] =&amp;gt; true&lt;br /&gt;
//                     [Name] =&amp;gt; cat&lt;br /&gt;
//                 )&lt;br /&gt;
//             [1] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                     [Type] =&amp;gt; REF SV&lt;br /&gt;
//                     [HasObjectId] =&amp;gt; false&lt;br /&gt;
//                     [HasDefault] =&amp;gt; false&lt;br /&gt;
//                     [Name] =&amp;gt; dog&lt;br /&gt;
//                 )&lt;br /&gt;
//             [2] =&amp;gt; Array&lt;br /&gt;
//                 (&lt;br /&gt;
//                     [Type] =&amp;gt; SV&lt;br /&gt;
//                     [HasObjectId] =&amp;gt; false&lt;br /&gt;
//                     [HasDefault] =&amp;gt; false&lt;br /&gt;
//                     [Name] =&amp;gt; fox&lt;br /&gt;
//                 )&lt;br /&gt;
//         )&lt;br /&gt;
//     [UseArgVariable] =&amp;gt; false&lt;br /&gt;
//     [ReturnType] =&amp;gt; 0&lt;br /&gt;
//     [Scope] =&amp;gt; Public&lt;br /&gt;
//     [IsAbstract] =&amp;gt; false&lt;br /&gt;
//     [IsOverride] =&amp;gt; false&lt;br /&gt;
//     [AddOnce] =&amp;gt; false&lt;br /&gt;
//     [RuleCount] =&amp;gt; 0&lt;br /&gt;
//     [Rules] =&amp;gt; Array&lt;br /&gt;
//         (&lt;br /&gt;
//         )&lt;br /&gt;
// ) &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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_GetRelativePath</id>
		<title>Core Function GetRelativePath</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_GetRelativePath"/>
				<updated>2015-06-18T10:59:56Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Return Value */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
GetRelativePath( &amp;lt;Path1&amp;gt;, &amp;lt;path2&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Try makes a path relative to another.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== path1 : pathToWhichToMakeRelativeTo ====&lt;br /&gt;
&lt;br /&gt;
The path to which to make relative to.&lt;br /&gt;
&lt;br /&gt;
==== path2 : pathToMakeRelative ====&lt;br /&gt;
&lt;br /&gt;
The path to make relative.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns the relative path. &lt;br /&gt;
&lt;br /&gt;
Failure: Returns a copy of the pathToMakeRelative.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None&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;
// Path To Which To MakeRelative To&lt;br /&gt;
my $first = @&amp;quot;c:\folder1\folder2\folder4&amp;quot;;&lt;br /&gt;
// Path To Make Relative&lt;br /&gt;
my $second = @&amp;quot;c:\folder1\folder2\folder3\file1.txt&amp;quot;;&lt;br /&gt;
// Get the relative path&lt;br /&gt;
my $path =  GetRelativePath($first, $second);&lt;br /&gt;
// Print it&lt;br /&gt;
say $path;&lt;br /&gt;
// PRINTS:&lt;br /&gt;
// ..\folder3\file1.txt&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileAppendLines</id>
		<title>Core Function FileAppendLines</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileAppendLines"/>
				<updated>2015-06-18T10:38:50Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; FileAppendLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Append an array of lines to the end of previously opened file.  === Parameters === ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
FileAppendLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Append an array of lines to the end of previously opened file.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== file  ====&lt;br /&gt;
&lt;br /&gt;
A variable containing the File handle.&lt;br /&gt;
&lt;br /&gt;
==== array ====&lt;br /&gt;
&lt;br /&gt;
The array to write to the file.&lt;br /&gt;
&lt;br /&gt;
Each element in the array will be considered a new line for the file.&lt;br /&gt;
&lt;br /&gt;
==== lineBreak ====&lt;br /&gt;
&lt;br /&gt;
Optional; The line break to use.&lt;br /&gt;
&lt;br /&gt;
Default: &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== useAscii ====&lt;br /&gt;
&lt;br /&gt;
Optional: Flag to decide if ASCII encoding should be used&lt;br /&gt;
&lt;br /&gt;
True = Save using ASCII encoding&lt;br /&gt;
&lt;br /&gt;
False = Save using UNICODE encoding&lt;br /&gt;
&lt;br /&gt;
Default: false (All strings in Sputnik are Unicode to save them to file you must specifically request ASCII encoding)&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true&lt;br /&gt;
&lt;br /&gt;
Failure: Returns false if error occurs.&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;
$File = FileOpen(&amp;quot;a.txt&amp;quot;, &amp;quot;a&amp;quot;);&lt;br /&gt;
If(isVarObj($File, &amp;quot;file&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	FileAppendLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) );&lt;br /&gt;
	FileClose( $File );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets use &amp;quot;&amp;amp;lt;br&amp;amp;gt;&amp;quot; for the line breaks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$File = FileOpen(&amp;quot;a.txt&amp;quot;, &amp;quot;a&amp;quot;);&lt;br /&gt;
If(isVarObj($File, &amp;quot;file&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	FileAppendLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;), &amp;quot;&amp;lt;br&amp;gt;&amp;quot; );&lt;br /&gt;
	FileClose( $File );&lt;br /&gt;
}&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileWriteLines</id>
		<title>Core Function FileWriteLines</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileWriteLines"/>
				<updated>2015-06-18T10:30:37Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
FileWriteLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Write an array of lines to previously opened file at the current File Steam pointer location.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== file  ====&lt;br /&gt;
&lt;br /&gt;
A variable containing the File handle.&lt;br /&gt;
&lt;br /&gt;
==== array ====&lt;br /&gt;
&lt;br /&gt;
The array to write to the file.&lt;br /&gt;
&lt;br /&gt;
Each element in the array will be considered a new line for the file.&lt;br /&gt;
&lt;br /&gt;
==== lineBreak ====&lt;br /&gt;
&lt;br /&gt;
Optional; The line break to use.&lt;br /&gt;
&lt;br /&gt;
Default: &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== useAscii ====&lt;br /&gt;
&lt;br /&gt;
Optional: Flag to decide if ASCII encoding should be used&lt;br /&gt;
&lt;br /&gt;
True = Save using ASCII encoding&lt;br /&gt;
&lt;br /&gt;
False = Save using UNICODE encoding&lt;br /&gt;
&lt;br /&gt;
Default: false (All strings in Sputnik are Unicode to save them to file you must specifically request ASCII encoding)&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true&lt;br /&gt;
&lt;br /&gt;
Failure: Returns false if error occurs.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
You can set the File Steam pointer location with [[Core Function FileSeek|FileSeek( )]].&lt;br /&gt;
&lt;br /&gt;
Warning this will not write to the end of the file unless you tell it to with seek so if you want to write to end of the file you should use [[Core Function FileAppendLines|FileAppendLines(  )]] instead.&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;
$File = FileOpen(&amp;quot;a.txt&amp;quot;, &amp;quot;w&amp;quot;);&lt;br /&gt;
If(isVarObj($File, &amp;quot;file&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;br /&gt;
	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) );&lt;br /&gt;
	FileClose( $File );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets use &amp;quot;&amp;amp;lt;br&amp;amp;gt;&amp;quot; for the line breaks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$File = FileOpen(&amp;quot;a.txt&amp;quot;, &amp;quot;w&amp;quot;);&lt;br /&gt;
If(isVarObj($File, &amp;quot;file&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;br /&gt;
	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;), &amp;quot;&amp;lt;br&amp;gt;&amp;quot; );&lt;br /&gt;
	FileClose( $File );&lt;br /&gt;
}&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileReadText</id>
		<title>Core Function FileReadText</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileReadText"/>
				<updated>2015-06-18T09:19:56Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: 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;hr /&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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileOpenText</id>
		<title>Core Function FileOpenText</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_FileOpenText"/>
				<updated>2015-06-18T09:16:26Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Example */&lt;/p&gt;
&lt;hr /&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;
	// 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>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_SSBufferPut</id>
		<title>Core Function SSBufferPut</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_SSBufferPut"/>
				<updated>2015-06-15T07:25:37Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt; SSBufferPut( &amp;lt;netBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Add data to a net buffer.  === Parameters ===  ==== &amp;lt;netBuffer&amp;gt; ====  The net buffer to write to.  =...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SSBufferPut( &amp;lt;netBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Add data to a net buffer.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;netBuffer&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The net buffer to write to.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;data type&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The type of data to write to the message buffer valid options are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[CODE]		[TYPE]&lt;br /&gt;
&amp;quot;v&amp;quot;		Binary (Writes an Int32 for size then writes the bytes)&lt;br /&gt;
&amp;quot;V&amp;quot;		Binary (Writes all bytes)&lt;br /&gt;
&amp;quot;b&amp;quot;		Byte (signed)&lt;br /&gt;
&amp;quot;B&amp;quot;		Byte (unsigned)&lt;br /&gt;
&amp;quot;s&amp;quot;		Int16&lt;br /&gt;
&amp;quot;i&amp;quot;		Int32&lt;br /&gt;
&amp;quot;l&amp;quot;		Int64&lt;br /&gt;
&amp;quot;S&amp;quot;		UInt16&lt;br /&gt;
&amp;quot;I&amp;quot;		UInt32&lt;br /&gt;
&amp;quot;L&amp;quot;		UInt64&lt;br /&gt;
&amp;quot;f&amp;quot;		Float&lt;br /&gt;
&amp;quot;d&amp;quot;		Double&lt;br /&gt;
&amp;quot;p&amp;quot;		String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true. &lt;br /&gt;
&lt;br /&gt;
Failure: Returns false. &lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This is NOT a generic socket toolset; You can't use this to connect to anything instead it is used to connect Sputnik clients with Sputnik servers in a very easy to use way.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
See the Listen() and Connect() for examples&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_SSBufferNew</id>
		<title>Core Function SSBufferNew</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php/Core_Function_SSBufferNew"/>
				<updated>2015-06-15T06:28:55Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: Created page with &amp;quot;&amp;lt;pre&amp;gt;  SSBufferNew( &amp;lt;nothing/server/client&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Create a new net buffer to store data to send to the client/server.  === Parameters ===  ==== &amp;lt;nothing/...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 SSBufferNew( &amp;lt;nothing/server/client&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Create a new net buffer to store data to send to the client/server.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;nothing/server/client&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Optional; The client/server object to request the new buffer from.&lt;br /&gt;
&lt;br /&gt;
If this param is not given then the net buffer will created stand alone and can be still be sent just fine.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns message buffer object. &lt;br /&gt;
&lt;br /&gt;
Failure: Returns null. &lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This is NOT a generic socket toolset; You can't use this to connect to anything instead it is used to connect Sputnik clients with Sputnik servers in a very easy to use way.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
See the Listen() and Connect() for examples&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>