<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://ubersoft.org/Sputnik/wiki/index.php?feed=atom&amp;target=UberFoX&amp;title=Special%3AContributions%2FUberFoX</id>
		<title>Sputnik Wiki - User contributions [en-gb]</title>
		<link rel="self" type="application/atom+xml" href="http://ubersoft.org/Sputnik/wiki/index.php?feed=atom&amp;target=UberFoX&amp;title=Special%3AContributions%2FUberFoX"/>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Special:Contributions/UberFoX"/>
		<updated>2026-04-06T14:33:28Z</updated>
		<subtitle>From Sputnik Wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2016-11-09T12:00:21Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.37 @ 13-04-2016 12:17 AM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.38 @ 09-11-2016 12:00 PM ==&lt;br /&gt;
* Updated the &amp;quot;Pengo&amp;quot; example with the final version ever made in Sputnik it features a lot more ghosts/powerups/ais and levels&lt;br /&gt;
* Updated the &amp;quot;Sputnik IDE&amp;quot; example it is now the latest and final version of the Sputnik Old GUI IDE it also comes with several sample projects including Peppie etc&lt;br /&gt;
* Added new example it is a server manager for the game 7 days to die&lt;br /&gt;
* Added new example D2ChanBot it is a bare bones Diablo 2 channel bot for PVPGN&lt;br /&gt;
* Added back Linux/Mac support once more (again as long just 1 person is interested!)&lt;br /&gt;
* Major improvement to &amp;quot;Class extends Name&amp;quot; where if the class is already running it will be hotswapped instead of the older version kept on pre initialized variables&lt;br /&gt;
* Fixed a bug in Min() and Max() that could make them not work properly in rare cases&lt;br /&gt;
* Fixed a major bug when deleting a key from an array if the key was numeric and very high&lt;br /&gt;
* Fixed a bug with funtions that get an array recursively they will now not include the recursive arrays themself and just its values&lt;br /&gt;
* Changed how Unserialize() works to fix a glitch in DLL Sputnik that can cause a crash (only happeneds in DLL version)&lt;br /&gt;
* Added UnsetClassFunction() to do exactly what it says it does&lt;br /&gt;
* Fixed a bug in sort() where if the array has only 1 (or less) elements it will return blank instead of returning a copy (if the flag asks for a return)&lt;br /&gt;
* Fixed Tb() to add the . to the end instead of the beginning if the string isnt long enough&lt;br /&gt;
* Added Bt64()&lt;br /&gt;
* Added Tb64()&lt;br /&gt;
* Did a little tweak to arrays to make sure they can never ever return disposed SVs&lt;br /&gt;
* Made a tweak for binary &amp;quot;$var[0] = 'T'&amp;quot; it now works and doesnt need @'T' since it will correctly use the first char of the string&lt;br /&gt;
* If you do &amp;quot;$var[7] = 'T'&amp;quot; on binary it will now expand the binary size so the position fits inside just like how it does with strings&lt;br /&gt;
* Added BinaryGrow() it can be used to increase the size of binary by appending stuff to the end either zero bytes or a specific byte&lt;br /&gt;
* Added StrGrow() it works same as BinaryGrow() but for strings instead also it returns a copy instead of editing the string&lt;br /&gt;
* Vec() improved internally espeically with binary and will now if a binary provided is over 8 bytes it will use the first 8 as an integer in operations&lt;br /&gt;
* StrUncompress() is now a lot faster&lt;br /&gt;
* Order() speed improved a bit&lt;br /&gt;
* NthField() has been speed up a lot and fixed to handle multiple lines&lt;br /&gt;
* CountFields() fixed to handle multiple lines so it now returns how many fields there are in grand total amung all records&lt;br /&gt;
* Addes NthRecord() it works similar to NthField() but returns an entire record at the given line instead of just a field&lt;br /&gt;
* Added CountRecords() it works similar to CountFields() but returns how many records there are (one per line)&lt;br /&gt;
* Fixed a few exceptions that can happen if invalid binary is given for reading NBTs&lt;br /&gt;
* Added IsVarArrayOf() it checks if a variable is an array and checks if all elements inside the array are a specific type (such as string or class names)&lt;br /&gt;
* Added a wave of encryption functions below:&lt;br /&gt;
* EncCreatePass() this allows you to create a new pass (key and iv) from a given passphase with any amount of iterations and optionally a base salt&lt;br /&gt;
* EncGenPass() this generates a new key and iv (randomized) using secure crypto random number generating it can be used to encrypt/decrypt AES etc data&lt;br /&gt;
* EncPassInfo() prints all information about a pass made with EncGenPass()&lt;br /&gt;
* EncGenKey() generate an RSA public &amp;amp; private key for use with encryption&lt;br /&gt;
* EncKeyInfo() prints all information (including the raw xml (for export/saving), bytes etc) about a key made with EncGenKey()&lt;br /&gt;
* EncLoadKey() loads an encryption key from a string&lt;br /&gt;
* Encrypt() encrypt data using a key&lt;br /&gt;
* Decrypt() decrypt data using a key&lt;br /&gt;
* Sign() sign data using a private key that is proof only the owner of the private key could have signed but anybody with the public key can verify it&lt;br /&gt;
* Verify() verify a signature with data using a public key&lt;br /&gt;
* EncryptAes() encrypt data using the AES algorithm using a pass made from EncGenPass()&lt;br /&gt;
* DecryptAes() dencrypt data using the AES algorithm using a pass made from EncGenPass()&lt;br /&gt;
* EncryptPass() encrypt (using public key) a pass created from EncGenPass() with a key created from EncGenPass() so the encrypted pass can be sent to the client to decrypt using its private key&lt;br /&gt;
* DecryptPass() decrypt (using private key) an encrypted pass created from EncryptPass() so that AES encrypted data can now be decrypted&lt;br /&gt;
* EncryptChunk() this combines EncryptPass() and EncryptAes() to bascially encrypt the pass first then encrypt the data with the password then combine the encrypted data and the encrypted password into a single binary chunk to be decrypted later by the end users private key&lt;br /&gt;
* DecryptChunk() this simply reverses what EncryptChunk() did and returns the original data&lt;br /&gt;
* Added @EncKeyLen macro that shows how many bytes a &amp;quot;key&amp;quot; part of an AES pass should be (should you want to seed your own)&lt;br /&gt;
* Added @EncIvLen macro that shows how many bytes a &amp;quot;iv&amp;quot; part of an AES pass should be (should you want to seed your own)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.37 @ 13-04-2016 12:17 AM ==&lt;br /&gt;
* Fixed a serious bug where $this wasnt being set on unserialized classes&lt;br /&gt;
* ConsoleWithInput example now splits big strings using wordwrap so it all fits properly&lt;br /&gt;
* Count() is more accurate when used on arrays with disposed elements it will no longer say the array has the element&lt;br /&gt;
* All obfuscation, renaming and everything to do with such has been removed from Sputnik (so full source is now viewable) however Sputnik will maintain embedding .dlls in its .exe since they are third party support dlls and are not &amp;quot;Spuntik___.dll&amp;quot;s (such as mysql.data.dll) as such they will be kept inside the .exe since it is rather pointless not to keep them there since then there is less dlls to give with a compiled script (same goes for Sputnik.dll)&lt;br /&gt;
* Due to lack of Linux/Mac users (zero infact) Sputnik will no longer support them forever I kept Sputnik having support for them platforms for a long time and even came back to it after it was briefly removed however this time it is final there just nobody who uses it on them platforms...&lt;br /&gt;
* The Sputnik GUI IDE which is used to create GUI scripts easily now has all its source code included in the Examples folder as another good example of Sputnik&lt;br /&gt;
* Removed the &amp;quot;Goto&amp;quot; statement as a result Switch/Select now use &amp;quot;continue _name;&amp;quot; instead of &amp;quot;goto _name;&amp;quot;&lt;br /&gt;
* You can now use &amp;amp; to pass variables by ref when using ... in a function like &amp;quot;function test(...&amp;amp;$numbers)&amp;quot;&lt;br /&gt;
* Fixed a bug where &amp;quot;test(...$a);&amp;quot; wouldnt work but &amp;quot;test2(...$a, 7);&amp;quot; would since the parser considers (&amp;lt;ONE OBJECT&amp;gt;) to be the different&lt;br /&gt;
* As a result of the above fix stuff that gets surrounded in (((((()))))) should now get resolved properly (sputnik now peels back the () layers to reveal the item itself)&lt;br /&gt;
* Operator overloads are a bit faster&lt;br /&gt;
* Class magic functions, operator overloads and iterator functions are now thread safe however only one thread at a time can use the SAME function (multiple threads can use multiple magic functions sure but only one can use the same function at a time)&lt;br /&gt;
* Fixed a typo in &amp;quot;NBTCompoundReadFile&amp;quot; that would make it ignore the compression flag&lt;br /&gt;
* Fixed the same typo that also affected &amp;quot;NBTCompoundWriteFile&amp;quot;&lt;br /&gt;
* Improved safety of NBTCompoundWriteFile and made it even more reliable (it even checks the written bytes)&lt;br /&gt;
* List() now supports iterator classes&lt;br /&gt;
* List() is now slightly faster&lt;br /&gt;
* You can no longer use &amp;quot;strings&amp;quot; on break/continue statements and must instead provide an identifier like &amp;quot;continue test;&amp;quot;&lt;br /&gt;
* You can no longer use (  ) on break/continue statements and they now only accept either no params, an identifier or a variable/decimal etc if you do not provide an identifier then you will be expected to provide something that resolves to an integer&lt;br /&gt;
* You can now continue to a named label like &amp;quot;continue('labelName');&amp;quot; and it will redo the label block similar to how you can break from named labels well this lets you redo the named label similar to how java handles named labels&lt;br /&gt;
* You can  now do a &amp;quot;try{}&amp;quot; by itself and you do not need to include any &amp;quot;catch&amp;quot; statements this allows for quick and easy &amp;quot;try&amp;quot; statements you can still include a &amp;quot;finally&amp;quot; statement at the end if you wish&lt;br /&gt;
* Fixed a minor glitch in &amp;quot;try&amp;quot; where if the exception variable was somehow not an &amp;quot;exception class&amp;quot; Sputnik could crash&lt;br /&gt;
* You can now use &amp;quot;try&amp;quot; like a &amp;quot;using&amp;quot; statement using the new &amp;quot;()&amp;quot; braces for example &amp;quot;try($a = new test()) { }&amp;quot; everything inside the &amp;quot;()&amp;quot; will get an unset() once the try is finished (after the finally if there is one) this allows like a combination of &amp;quot;try&amp;quot; and &amp;quot;using&amp;quot; at the same time which is good for cleaning up after you&lt;br /&gt;
* Added a new &amp;quot;When&amp;quot; statement onto the &amp;quot;Catch&amp;quot; statement it works like so &amp;quot;Catch (Exception e) When ($a == 60)&amp;quot; it basically acts like an if statement and that individual catch is only triggered when the &amp;quot;when&amp;quot; statement is true you can of course use it without the exception info like &amp;quot;Catch When ($a == 10)&amp;quot;&lt;br /&gt;
* Added new function IsVarPointer() it basically does same thing IsVarPtr() and IsVarUPtr() do but both at same time&lt;br /&gt;
* GetVarType() now returns @TypeError on failure&lt;br /&gt;
* Added a second param to GetVarType() which when true allows the first param to be a string of name a type such as &amp;quot;binary&amp;quot; and then the function will return the type number from the string so now GetVarTypeName() has a reverse function&lt;br /&gt;
* &amp;quot;Continue&amp;quot; and &amp;quot;Break&amp;quot; statements no longer give an error immediately if the name they are looking for does not exist however the code will still fail&lt;br /&gt;
* Named blocks are now defined like &amp;quot;name:{}&amp;quot; instead of &amp;quot;name{}&amp;quot;&lt;br /&gt;
* Macro &amp;quot;@CaseState&amp;quot; now works properly for &amp;quot;Switch&amp;quot; statements&lt;br /&gt;
* Fixed a glitch in &amp;quot;Switch&amp;quot; statement where where ranges and regex would not work&lt;br /&gt;
* Fixed a bug where if the caseId was not found then a switch/select would loop forever&lt;br /&gt;
* Renamed &amp;quot;_default&amp;quot; to &amp;quot;_caseDefault&amp;quot; for Switch/Select&lt;br /&gt;
* Switch/Select that are nested etc will now properly destroy any continue to starting with &amp;quot;_case&amp;quot; so that it does not spread beyond the switch this does of course mean that you can only jump to/from the current switch/select and not into another nesting will not work for the jumps (same as before)&lt;br /&gt;
* Various improvements to &amp;quot;Switch&amp;quot; and &amp;quot;Select&amp;quot; they also now share the same code base (Select inherits Switch)&lt;br /&gt;
* Fixed a glitch in Named Blocks that could cause them to iterate forever&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.36 @ 19-12-2015 12:17 AM ==&lt;br /&gt;
* Fixed a bug where a while etc placed after a statement could cause an exception if there wasnt enough params&lt;br /&gt;
* Fixed a potential issue where modifying a string during a loop would cause a crash&lt;br /&gt;
* Fixed a potential issue where modifying a binary variable during a loop would cause a crash&lt;br /&gt;
* Fixed a bug where if you used unset() or something happened to unset the variable used in a foreach loop the loop would fail&lt;br /&gt;
* Fixed another bug in IsSet() also it properly handles refs and it returns false if an SV become an error data type&lt;br /&gt;
* Enum rule Flags TRUE now causes the first value to be 0 so you can set that as *none* etc&lt;br /&gt;
* Added PadSep() it is just a simple function that will create text with separators of a given count for example PadSep('N', '/', 4) will produce 'N/N/N/N' (without quotes)&lt;br /&gt;
* You can now define FLOAT hex literals using 0x30Ap&lt;br /&gt;
* You can now define DOUBLE hex literals using 0x30AP&lt;br /&gt;
* Oct() has been renamed to OctDec() so it is easier to see what it is doing&lt;br /&gt;
* OctDec() is now faster&lt;br /&gt;
* Added DecBin() to convert Decimal to Binary&lt;br /&gt;
* Added BinDec() to convert Binary to Decimal&lt;br /&gt;
* Fixed a bug in &amp;quot;ReturnCast&amp;quot; where it couldnt use regular types like Int64 etc&lt;br /&gt;
* Function rules &amp;quot;Returns/ReturnCast&amp;quot; can now be set to require a class type by name instead of just the usual types like Int32&lt;br /&gt;
* All functions now exexcute the &amp;quot;Return&amp;quot; statement if they are using &amp;quot;Returns&amp;quot; or &amp;quot;ReturnCast&amp;quot; flag and they did not execute the &amp;quot;Return&amp;quot; statement themselves&lt;br /&gt;
* Added a new rule to functions &amp;quot;Strict&amp;quot; that will disregard inherited classes and require a match on the main class name&lt;br /&gt;
* JSONDecode() can now correctly read raw true/false (the ones that arent quoted) such as {&amp;quot;active&amp;quot;:true}&lt;br /&gt;
* JSONEncode() now saves booleans as literal true/false (without quotes at all) instead of as a string&lt;br /&gt;
* Added new option to JSONEncode() called @JSON_STRING_BOOLEAN this will make booleans become literal &amp;quot;true&amp;quot; &amp;quot;false&amp;quot; strings if you dont use this option then booleans will be saved as literal true/false (without quotes at all)&lt;br /&gt;
* Added new option to JSONDecode() called @JSON_CHECK_STRING_BOOLEAN make it so any string that contains just &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot; (case insensitive) will become a literal boolean this wont slow down the decoding much since it only checks strings that are 4 or 5 chars in length&lt;br /&gt;
* A string casting as a bool is now true if it contains &amp;quot;TrUe&amp;quot; etc case no longer cares for case&lt;br /&gt;
* Changed internals of the &amp;quot;object&amp;quot; variable type cleaned it up alot there is now interfaces for casting on objects so anything can do it not just classes etc (will prove useful for future object types)&lt;br /&gt;
* VarObjTypeToString() function deleted&lt;br /&gt;
* VarObjTypeFromString() function deleted&lt;br /&gt;
* GetVarOBJTypeName() function deleted&lt;br /&gt;
* GetVarOBJType() function deleted&lt;br /&gt;
* IsVarObj (param 2 removed)&lt;br /&gt;
* Count() no longer returns null when used on a class that does not contain the count property (return 0 instead) same goes for other fails&lt;br /&gt;
* Objects when cast as a string now return their type and default &amp;quot;ToString&amp;quot; function output if the object does not have a Sputnik string returner&lt;br /&gt;
* The (binary) cast on an array is now recursive&lt;br /&gt;
* Added &amp;quot;Synchronized&amp;quot; flag to functions it can be used to specify only one instance of that function can be executing at a time (regardless of how many threads want to)&lt;br /&gt;
* ThreadCreate() accepts function(){} instead of a string&lt;br /&gt;
* HotKeySet() accepts function(){} instead of a string&lt;br /&gt;
* Added new function FMod()&lt;br /&gt;
* Added new internal class &amp;quot;Serializable&amp;quot; it can be used to custom handle a class in Serialize() and Unserialize()&lt;br /&gt;
* You can now use () braces in List() params it will grab a variable and set its value like &amp;quot;list( ($this-&amp;gt;$cat) ) = $arr;&amp;quot; this is useful since you can use the () braces to set any variable even static :: variables etc where as before you could only set a named global/local variable the reason it has to use the () braces and not work without it is because of the way the param system was designed a long time ago however it is expected most people would try to () brace if their first idea of not using braces didnt work (it is logical to assume braces might help)&lt;br /&gt;
* Operators [] and []! and [&amp;lt;&amp;gt;] and [&amp;lt;=&amp;gt;] for arrays now work on ref arrays without needing to * resolve the ref (not every operator in Sputnik should resolve the ref however these ones are specific to arrays and should work on ref arrays to be logical just like [index] does)&lt;br /&gt;
* Added new internal class &amp;quot;Traversable&amp;quot; it is simply used to check if a given class can be used in a foreach loop you cant use &amp;quot;Traversable&amp;quot; by itself and it must be used with a built in thing&lt;br /&gt;
* Added new internal class &amp;quot;Iterator&amp;quot; (it inherits Traversable) it can be used on a class and provides 3 functions &amp;quot;Valid()&amp;quot; should check if the current position is valid (so it lets you allow null returns) &amp;quot;Rewind()&amp;quot; should reset the position back to start and &amp;quot;Next()&amp;quot; should return the next element from the iterator and finally &amp;quot;Key()&amp;quot; should give the current key either as a number or string (the key will always be converted to a string) all this is for use with the foreach() loop as a side note the foreach() loop runs the &amp;quot;Rewind()&amp;quot; function before it starts the loop&lt;br /&gt;
* Added new function IteratorToArray() it does exactly what the name says converts a class that inherits &amp;quot;Iterator&amp;quot; into an array with optional key grab or just values&lt;br /&gt;
* Fixed a bug is IsSet() it was not using &amp;quot;return true/false&amp;quot; properly and would return TRUE if you returned false (since you didnt return null)&lt;br /&gt;
* Added a simple chat only Hotline Server to the Examples folder it has a better protocol implementation than the client does and is more accurate and improved the HotlineClient example a bit&lt;br /&gt;
* Added new example The Long Dark trainer this trainer demonstrates how to use CheatEngine scripts with Sputnik without having CheatEngine installed and never using CheatEngine at all (Using SputnikAsm.dll)&lt;br /&gt;
* Improved InArray() a bit&lt;br /&gt;
* Added ... for variadic functions it is used to provide easier usage of infinite arg functions &amp;quot;function f($req, $opt = null, ...$params)&amp;quot; once the function reaches $params (or any name you want) it will push all the remaining params into it and send it as an array to the function you can also do type based like &amp;quot;function f($req, $opt = null, int ...$params)&amp;quot;&lt;br /&gt;
* Added ... for variadic functions but this time as a call param for example &amp;quot;add(1, ...$operators);&amp;quot; will unpack $operators array or iterable class into arguments of the function&lt;br /&gt;
* Fixed a bug where if a function call ended in failure (major error) the stack wouldnt be popped&lt;br /&gt;
* Added new function HashEquals() it will compare an expected hash to an input hash make sure its valid it will also check they both the same size and what not for use with crypt() and other such hash functions&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.35 @ 29-09-2015 12:17 AM ==&lt;br /&gt;
* Bitwise string stuff no longer casts each string char as a byte (thus losing data if its unicode) so it now correctly works with Sputniks unicode strings&lt;br /&gt;
* Fixed a bug where the list of classes a class inherits may get disordered resulting in some interesting things to happen&lt;br /&gt;
* Greatly improved speed of class magic functions: JsonSerialize() ShouldJsonSerialize() __Set() _Get() __IsSet() __Unset()&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would not call the class function __IsSet() with first param as 'Bar' at all&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a bug where unset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a glitch where if there is no class function __Unset() and you did unset($a['Bar']); it would try unset the elemnent&lt;br /&gt;
* Parent::FunctionName() will no longer give an error if you inherited more than one class and will instead use the first inherited class to locate the function if it is not found on the first it wil try the second and so on until it finds it&lt;br /&gt;
* Renamed function Use() to PluginLoad()&lt;br /&gt;
* Renamed function Unuse() to PluginUnload()&lt;br /&gt;
* Removed function TokenClass()&lt;br /&gt;
* Removed function IsToken()&lt;br /&gt;
* The parser no longer needs to use TokenClass()/IsToken() or ObjToVar() and as a result is more user friendly also it doesnt require pointers anymore (the calc example has been updated to show this change)&lt;br /&gt;
* Fixed a minor issue where Parse() might not return NULL on a certain failure&lt;br /&gt;
* You no longer need to have the __Construct() { } as an empty when using the parser you can now omit it entirely&lt;br /&gt;
* Renamed magic class function __call() to __invoke()&lt;br /&gt;
* Added magic class function __call() it has two arguments the first is a function name and the second is an array of params this will get called if you try call a class function that does not exist its name and arguments you tried to use will be passed to __call()&lt;br /&gt;
* Added magic class function __callStatic() it works similar to __call() but instead of working on an instance it works in static context only&lt;br /&gt;
* Call() no longer checks if you typed a static function&lt;br /&gt;
* CallArray() no longer checks if you typed a static function&lt;br /&gt;
* -&amp;gt;/=&amp;gt; no longer checks if you typed a static function&lt;br /&gt;
* class::function no longer tells you if you didnt type a static function&lt;br /&gt;
* self:: now shows an error if there is no self class found&lt;br /&gt;
* Removed requirements that enum (when using flags) values be divisible by 2 and and higher than 0 this means you get to decide what the number is and join multiple flags together however you should take care to make sure the number is valid&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on enums to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on functions to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Added UInteger() and the new cast (UInteger) for unsigned 64-bit integer (or highest available)&lt;br /&gt;
* You can now use the &amp;quot;Not&amp;quot; keyword instead of &amp;quot;!&amp;quot; for example if (NOT $a) is the same as if (!$a) &lt;br /&gt;
* You can now do $array .= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* You can now do $array ..= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* Fixed a bug where say(&amp;quot;CAT&amp;quot;) x 3 would print &amp;quot;CATCATCAT&amp;quot; instead of printing each one on a new line&lt;br /&gt;
* Fixed same bug as above this time time with xx instead of x&lt;br /&gt;
* You can now have infinite $ on your variable for use with Variable Variables like $$$$bar it will resolve each one&lt;br /&gt;
* Added IntDiv() it works like a normal $a / $b when using integers but does it in a function&lt;br /&gt;
* Added FDiv() it works like IntDiv() but for use with floating point numbers&lt;br /&gt;
* Fixed a bug where Switch() wasnt working properly with ranges and regex&lt;br /&gt;
* Fixed a bug in preprocessor where #predef and #unpredef would get confused by case now it is properly case insensitive&lt;br /&gt;
* Fixed a bug with the parser that caused the current instance of Sputnik to get lost on second parse when using preprocessor&lt;br /&gt;
* Fixed a bug where if you did a function name with no brackets like test; the &amp;quot;;&amp;quot; symbol would be used as its *first and only* param this has been fixed so now ; is omitted from any call this also means you can no longer use ; as a computable value&lt;br /&gt;
* As a result of the above fix you can now use redo; properly again in try/catch/finally&lt;br /&gt;
* You can now omit the ( ) when doing &amp;quot;my $Func = Function() { printr @Args; };&amp;quot; like so &amp;quot;my $Func = Function { printr @Args; };&amp;quot; this will cause the Args rule to set to TRUE automatically so you dont need to type it&lt;br /&gt;
* Added new macro @ArgCount this contains the number elements in @Args for functions with infinite params @ArgCount is basically Count(@Args)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.34 @ 24-09-2015 05:45 AM ==&lt;br /&gt;
* Unknown (was lost somehow)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.33 @ 20-09-2015 05:55 PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Main_Page"/>
				<updated>2016-11-09T11:59:45Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik Programming Language ==&lt;br /&gt;
&lt;br /&gt;
* [[What is Sputnik|What is Sputnik?]]&lt;br /&gt;
* [[The Team|The Team]]&lt;br /&gt;
* [[Language Reference|Language Reference]]&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
* [[Class Reference|Class Reference]]&lt;br /&gt;
* [[Version History|Version History]]&lt;br /&gt;
&lt;br /&gt;
Warning; Information on the wiki may not always be accurate to current downloadable version of Sputnik.&lt;br /&gt;
&lt;br /&gt;
However effort is taken to keep Sputnik compatible with older versions and any changes to that are for the better good overall.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
&lt;br /&gt;
[http://ubersoft.org/download/Sputnik38.rar Sputnik 0.38]&lt;br /&gt;
&lt;br /&gt;
(Extract download with [http://www.rarlab.com/download.htm WinRAR] 5.0 or higher)&lt;br /&gt;
&lt;br /&gt;
=== Contact ===&lt;br /&gt;
&lt;br /&gt;
UberFoX - Lead Programmer&lt;br /&gt;
&lt;br /&gt;
[mailto:uberfox@hotmail.com uberfox@hotmail.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Intro]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2016-11-06T02:49:01Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.36 @ 19-12-2015 12:17 AM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.37 @ 13-04-2016 12:17 AM ==&lt;br /&gt;
* Fixed a serious bug where $this wasnt being set on unserialized classes&lt;br /&gt;
* ConsoleWithInput example now splits big strings using wordwrap so it all fits properly&lt;br /&gt;
* Count() is more accurate when used on arrays with disposed elements it will no longer say the array has the element&lt;br /&gt;
* All obfuscation, renaming and everything to do with such has been removed from Sputnik (so full source is now viewable) however Sputnik will maintain embedding .dlls in its .exe since they are third party support dlls and are not &amp;quot;Spuntik___.dll&amp;quot;s (such as mysql.data.dll) as such they will be kept inside the .exe since it is rather pointless not to keep them there since then there is less dlls to give with a compiled script (same goes for Sputnik.dll)&lt;br /&gt;
* Due to lack of Linux/Mac users (zero infact) Sputnik will no longer support them forever I kept Sputnik having support for them platforms for a long time and even came back to it after it was briefly removed however this time it is final there just nobody who uses it on them platforms...&lt;br /&gt;
* The Sputnik GUI IDE which is used to create GUI scripts easily now has all its source code included in the Examples folder as another good example of Sputnik&lt;br /&gt;
* Removed the &amp;quot;Goto&amp;quot; statement as a result Switch/Select now use &amp;quot;continue _name;&amp;quot; instead of &amp;quot;goto _name;&amp;quot;&lt;br /&gt;
* You can now use &amp;amp; to pass variables by ref when using ... in a function like &amp;quot;function test(...&amp;amp;$numbers)&amp;quot;&lt;br /&gt;
* Fixed a bug where &amp;quot;test(...$a);&amp;quot; wouldnt work but &amp;quot;test2(...$a, 7);&amp;quot; would since the parser considers (&amp;lt;ONE OBJECT&amp;gt;) to be the different&lt;br /&gt;
* As a result of the above fix stuff that gets surrounded in (((((()))))) should now get resolved properly (sputnik now peels back the () layers to reveal the item itself)&lt;br /&gt;
* Operator overloads are a bit faster&lt;br /&gt;
* Class magic functions, operator overloads and iterator functions are now thread safe however only one thread at a time can use the SAME function (multiple threads can use multiple magic functions sure but only one can use the same function at a time)&lt;br /&gt;
* Fixed a typo in &amp;quot;NBTCompoundReadFile&amp;quot; that would make it ignore the compression flag&lt;br /&gt;
* Fixed the same typo that also affected &amp;quot;NBTCompoundWriteFile&amp;quot;&lt;br /&gt;
* Improved safety of NBTCompoundWriteFile and made it even more reliable (it even checks the written bytes)&lt;br /&gt;
* List() now supports iterator classes&lt;br /&gt;
* List() is now slightly faster&lt;br /&gt;
* You can no longer use &amp;quot;strings&amp;quot; on break/continue statements and must instead provide an identifier like &amp;quot;continue test;&amp;quot;&lt;br /&gt;
* You can no longer use (  ) on break/continue statements and they now only accept either no params, an identifier or a variable/decimal etc if you do not provide an identifier then you will be expected to provide something that resolves to an integer&lt;br /&gt;
* You can now continue to a named label like &amp;quot;continue('labelName');&amp;quot; and it will redo the label block similar to how you can break from named labels well this lets you redo the named label similar to how java handles named labels&lt;br /&gt;
* You can  now do a &amp;quot;try{}&amp;quot; by itself and you do not need to include any &amp;quot;catch&amp;quot; statements this allows for quick and easy &amp;quot;try&amp;quot; statements you can still include a &amp;quot;finally&amp;quot; statement at the end if you wish&lt;br /&gt;
* Fixed a minor glitch in &amp;quot;try&amp;quot; where if the exception variable was somehow not an &amp;quot;exception class&amp;quot; Sputnik could crash&lt;br /&gt;
* You can now use &amp;quot;try&amp;quot; like a &amp;quot;using&amp;quot; statement using the new &amp;quot;()&amp;quot; braces for example &amp;quot;try($a = new test()) { }&amp;quot; everything inside the &amp;quot;()&amp;quot; will get an unset() once the try is finished (after the finally if there is one) this allows like a combination of &amp;quot;try&amp;quot; and &amp;quot;using&amp;quot; at the same time which is good for cleaning up after you&lt;br /&gt;
* Added a new &amp;quot;When&amp;quot; statement onto the &amp;quot;Catch&amp;quot; statement it works like so &amp;quot;Catch (Exception e) When ($a == 60)&amp;quot; it basically acts like an if statement and that individual catch is only triggered when the &amp;quot;when&amp;quot; statement is true you can of course use it without the exception info like &amp;quot;Catch When ($a == 10)&amp;quot;&lt;br /&gt;
* Added new function IsVarPointer() it basically does same thing IsVarPtr() and IsVarUPtr() do but both at same time&lt;br /&gt;
* GetVarType() now returns @TypeError on failure&lt;br /&gt;
* Added a second param to GetVarType() which when true allows the first param to be a string of name a type such as &amp;quot;binary&amp;quot; and then the function will return the type number from the string so now GetVarTypeName() has a reverse function&lt;br /&gt;
* &amp;quot;Continue&amp;quot; and &amp;quot;Break&amp;quot; statements no longer give an error immediately if the name they are looking for does not exist however the code will still fail&lt;br /&gt;
* Named blocks are now defined like &amp;quot;name:{}&amp;quot; instead of &amp;quot;name{}&amp;quot;&lt;br /&gt;
* Macro &amp;quot;@CaseState&amp;quot; now works properly for &amp;quot;Switch&amp;quot; statements&lt;br /&gt;
* Fixed a glitch in &amp;quot;Switch&amp;quot; statement where where ranges and regex would not work&lt;br /&gt;
* Fixed a bug where if the caseId was not found then a switch/select would loop forever&lt;br /&gt;
* Renamed &amp;quot;_default&amp;quot; to &amp;quot;_caseDefault&amp;quot; for Switch/Select&lt;br /&gt;
* Switch/Select that are nested etc will now properly destroy any continue to starting with &amp;quot;_case&amp;quot; so that it does not spread beyond the switch this does of course mean that you can only jump to/from the current switch/select and not into another nesting will not work for the jumps (same as before)&lt;br /&gt;
* Various improvements to &amp;quot;Switch&amp;quot; and &amp;quot;Select&amp;quot; they also now share the same code base (Select inherits Switch)&lt;br /&gt;
* Fixed a glitch in Named Blocks that could cause them to iterate forever&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.36 @ 19-12-2015 12:17 AM ==&lt;br /&gt;
* Fixed a bug where a while etc placed after a statement could cause an exception if there wasnt enough params&lt;br /&gt;
* Fixed a potential issue where modifying a string during a loop would cause a crash&lt;br /&gt;
* Fixed a potential issue where modifying a binary variable during a loop would cause a crash&lt;br /&gt;
* Fixed a bug where if you used unset() or something happened to unset the variable used in a foreach loop the loop would fail&lt;br /&gt;
* Fixed another bug in IsSet() also it properly handles refs and it returns false if an SV become an error data type&lt;br /&gt;
* Enum rule Flags TRUE now causes the first value to be 0 so you can set that as *none* etc&lt;br /&gt;
* Added PadSep() it is just a simple function that will create text with separators of a given count for example PadSep('N', '/', 4) will produce 'N/N/N/N' (without quotes)&lt;br /&gt;
* You can now define FLOAT hex literals using 0x30Ap&lt;br /&gt;
* You can now define DOUBLE hex literals using 0x30AP&lt;br /&gt;
* Oct() has been renamed to OctDec() so it is easier to see what it is doing&lt;br /&gt;
* OctDec() is now faster&lt;br /&gt;
* Added DecBin() to convert Decimal to Binary&lt;br /&gt;
* Added BinDec() to convert Binary to Decimal&lt;br /&gt;
* Fixed a bug in &amp;quot;ReturnCast&amp;quot; where it couldnt use regular types like Int64 etc&lt;br /&gt;
* Function rules &amp;quot;Returns/ReturnCast&amp;quot; can now be set to require a class type by name instead of just the usual types like Int32&lt;br /&gt;
* All functions now exexcute the &amp;quot;Return&amp;quot; statement if they are using &amp;quot;Returns&amp;quot; or &amp;quot;ReturnCast&amp;quot; flag and they did not execute the &amp;quot;Return&amp;quot; statement themselves&lt;br /&gt;
* Added a new rule to functions &amp;quot;Strict&amp;quot; that will disregard inherited classes and require a match on the main class name&lt;br /&gt;
* JSONDecode() can now correctly read raw true/false (the ones that arent quoted) such as {&amp;quot;active&amp;quot;:true}&lt;br /&gt;
* JSONEncode() now saves booleans as literal true/false (without quotes at all) instead of as a string&lt;br /&gt;
* Added new option to JSONEncode() called @JSON_STRING_BOOLEAN this will make booleans become literal &amp;quot;true&amp;quot; &amp;quot;false&amp;quot; strings if you dont use this option then booleans will be saved as literal true/false (without quotes at all)&lt;br /&gt;
* Added new option to JSONDecode() called @JSON_CHECK_STRING_BOOLEAN make it so any string that contains just &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot; (case insensitive) will become a literal boolean this wont slow down the decoding much since it only checks strings that are 4 or 5 chars in length&lt;br /&gt;
* A string casting as a bool is now true if it contains &amp;quot;TrUe&amp;quot; etc case no longer cares for case&lt;br /&gt;
* Changed internals of the &amp;quot;object&amp;quot; variable type cleaned it up alot there is now interfaces for casting on objects so anything can do it not just classes etc (will prove useful for future object types)&lt;br /&gt;
* VarObjTypeToString() function deleted&lt;br /&gt;
* VarObjTypeFromString() function deleted&lt;br /&gt;
* GetVarOBJTypeName() function deleted&lt;br /&gt;
* GetVarOBJType() function deleted&lt;br /&gt;
* IsVarObj (param 2 removed)&lt;br /&gt;
* Count() no longer returns null when used on a class that does not contain the count property (return 0 instead) same goes for other fails&lt;br /&gt;
* Objects when cast as a string now return their type and default &amp;quot;ToString&amp;quot; function output if the object does not have a Sputnik string returner&lt;br /&gt;
* The (binary) cast on an array is now recursive&lt;br /&gt;
* Added &amp;quot;Synchronized&amp;quot; flag to functions it can be used to specify only one instance of that function can be executing at a time (regardless of how many threads want to)&lt;br /&gt;
* ThreadCreate() accepts function(){} instead of a string&lt;br /&gt;
* HotKeySet() accepts function(){} instead of a string&lt;br /&gt;
* Added new function FMod()&lt;br /&gt;
* Added new internal class &amp;quot;Serializable&amp;quot; it can be used to custom handle a class in Serialize() and Unserialize()&lt;br /&gt;
* You can now use () braces in List() params it will grab a variable and set its value like &amp;quot;list( ($this-&amp;gt;$cat) ) = $arr;&amp;quot; this is useful since you can use the () braces to set any variable even static :: variables etc where as before you could only set a named global/local variable the reason it has to use the () braces and not work without it is because of the way the param system was designed a long time ago however it is expected most people would try to () brace if their first idea of not using braces didnt work (it is logical to assume braces might help)&lt;br /&gt;
* Operators [] and []! and [&amp;lt;&amp;gt;] and [&amp;lt;=&amp;gt;] for arrays now work on ref arrays without needing to * resolve the ref (not every operator in Sputnik should resolve the ref however these ones are specific to arrays and should work on ref arrays to be logical just like [index] does)&lt;br /&gt;
* Added new internal class &amp;quot;Traversable&amp;quot; it is simply used to check if a given class can be used in a foreach loop you cant use &amp;quot;Traversable&amp;quot; by itself and it must be used with a built in thing&lt;br /&gt;
* Added new internal class &amp;quot;Iterator&amp;quot; (it inherits Traversable) it can be used on a class and provides 3 functions &amp;quot;Valid()&amp;quot; should check if the current position is valid (so it lets you allow null returns) &amp;quot;Rewind()&amp;quot; should reset the position back to start and &amp;quot;Next()&amp;quot; should return the next element from the iterator and finally &amp;quot;Key()&amp;quot; should give the current key either as a number or string (the key will always be converted to a string) all this is for use with the foreach() loop as a side note the foreach() loop runs the &amp;quot;Rewind()&amp;quot; function before it starts the loop&lt;br /&gt;
* Added new function IteratorToArray() it does exactly what the name says converts a class that inherits &amp;quot;Iterator&amp;quot; into an array with optional key grab or just values&lt;br /&gt;
* Fixed a bug is IsSet() it was not using &amp;quot;return true/false&amp;quot; properly and would return TRUE if you returned false (since you didnt return null)&lt;br /&gt;
* Added a simple chat only Hotline Server to the Examples folder it has a better protocol implementation than the client does and is more accurate and improved the HotlineClient example a bit&lt;br /&gt;
* Added new example The Long Dark trainer this trainer demonstrates how to use CheatEngine scripts with Sputnik without having CheatEngine installed and never using CheatEngine at all (Using SputnikAsm.dll)&lt;br /&gt;
* Improved InArray() a bit&lt;br /&gt;
* Added ... for variadic functions it is used to provide easier usage of infinite arg functions &amp;quot;function f($req, $opt = null, ...$params)&amp;quot; once the function reaches $params (or any name you want) it will push all the remaining params into it and send it as an array to the function you can also do type based like &amp;quot;function f($req, $opt = null, int ...$params)&amp;quot;&lt;br /&gt;
* Added ... for variadic functions but this time as a call param for example &amp;quot;add(1, ...$operators);&amp;quot; will unpack $operators array or iterable class into arguments of the function&lt;br /&gt;
* Fixed a bug where if a function call ended in failure (major error) the stack wouldnt be popped&lt;br /&gt;
* Added new function HashEquals() it will compare an expected hash to an input hash make sure its valid it will also check they both the same size and what not for use with crypt() and other such hash functions&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.35 @ 29-09-2015 12:17 AM ==&lt;br /&gt;
* Bitwise string stuff no longer casts each string char as a byte (thus losing data if its unicode) so it now correctly works with Sputniks unicode strings&lt;br /&gt;
* Fixed a bug where the list of classes a class inherits may get disordered resulting in some interesting things to happen&lt;br /&gt;
* Greatly improved speed of class magic functions: JsonSerialize() ShouldJsonSerialize() __Set() _Get() __IsSet() __Unset()&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would not call the class function __IsSet() with first param as 'Bar' at all&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a bug where unset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a glitch where if there is no class function __Unset() and you did unset($a['Bar']); it would try unset the elemnent&lt;br /&gt;
* Parent::FunctionName() will no longer give an error if you inherited more than one class and will instead use the first inherited class to locate the function if it is not found on the first it wil try the second and so on until it finds it&lt;br /&gt;
* Renamed function Use() to PluginLoad()&lt;br /&gt;
* Renamed function Unuse() to PluginUnload()&lt;br /&gt;
* Removed function TokenClass()&lt;br /&gt;
* Removed function IsToken()&lt;br /&gt;
* The parser no longer needs to use TokenClass()/IsToken() or ObjToVar() and as a result is more user friendly also it doesnt require pointers anymore (the calc example has been updated to show this change)&lt;br /&gt;
* Fixed a minor issue where Parse() might not return NULL on a certain failure&lt;br /&gt;
* You no longer need to have the __Construct() { } as an empty when using the parser you can now omit it entirely&lt;br /&gt;
* Renamed magic class function __call() to __invoke()&lt;br /&gt;
* Added magic class function __call() it has two arguments the first is a function name and the second is an array of params this will get called if you try call a class function that does not exist its name and arguments you tried to use will be passed to __call()&lt;br /&gt;
* Added magic class function __callStatic() it works similar to __call() but instead of working on an instance it works in static context only&lt;br /&gt;
* Call() no longer checks if you typed a static function&lt;br /&gt;
* CallArray() no longer checks if you typed a static function&lt;br /&gt;
* -&amp;gt;/=&amp;gt; no longer checks if you typed a static function&lt;br /&gt;
* class::function no longer tells you if you didnt type a static function&lt;br /&gt;
* self:: now shows an error if there is no self class found&lt;br /&gt;
* Removed requirements that enum (when using flags) values be divisible by 2 and and higher than 0 this means you get to decide what the number is and join multiple flags together however you should take care to make sure the number is valid&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on enums to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on functions to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Added UInteger() and the new cast (UInteger) for unsigned 64-bit integer (or highest available)&lt;br /&gt;
* You can now use the &amp;quot;Not&amp;quot; keyword instead of &amp;quot;!&amp;quot; for example if (NOT $a) is the same as if (!$a) &lt;br /&gt;
* You can now do $array .= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* You can now do $array ..= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* Fixed a bug where say(&amp;quot;CAT&amp;quot;) x 3 would print &amp;quot;CATCATCAT&amp;quot; instead of printing each one on a new line&lt;br /&gt;
* Fixed same bug as above this time time with xx instead of x&lt;br /&gt;
* You can now have infinite $ on your variable for use with Variable Variables like $$$$bar it will resolve each one&lt;br /&gt;
* Added IntDiv() it works like a normal $a / $b when using integers but does it in a function&lt;br /&gt;
* Added FDiv() it works like IntDiv() but for use with floating point numbers&lt;br /&gt;
* Fixed a bug where Switch() wasnt working properly with ranges and regex&lt;br /&gt;
* Fixed a bug in preprocessor where #predef and #unpredef would get confused by case now it is properly case insensitive&lt;br /&gt;
* Fixed a bug with the parser that caused the current instance of Sputnik to get lost on second parse when using preprocessor&lt;br /&gt;
* Fixed a bug where if you did a function name with no brackets like test; the &amp;quot;;&amp;quot; symbol would be used as its *first and only* param this has been fixed so now ; is omitted from any call this also means you can no longer use ; as a computable value&lt;br /&gt;
* As a result of the above fix you can now use redo; properly again in try/catch/finally&lt;br /&gt;
* You can now omit the ( ) when doing &amp;quot;my $Func = Function() { printr @Args; };&amp;quot; like so &amp;quot;my $Func = Function { printr @Args; };&amp;quot; this will cause the Args rule to set to TRUE automatically so you dont need to type it&lt;br /&gt;
* Added new macro @ArgCount this contains the number elements in @Args for functions with infinite params @ArgCount is basically Count(@Args)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.34 @ 24-09-2015 05:45 AM ==&lt;br /&gt;
* Unknown (was lost somehow)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.33 @ 20-09-2015 05:55 PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2016-11-06T02:47:17Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.35 @ 29-09-2015 12:17 AM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.37 @ 13-04-2016 12:17 AM ==&lt;br /&gt;
* Fixed a serious bug where $this wasnt being set on unserialized classes&lt;br /&gt;
* ConsoleWithInput example now splits big strings using wordwrap so it all fits properly&lt;br /&gt;
* Count() is more accurate when used on arrays with disposed elements it will no longer say the array has the element&lt;br /&gt;
* All obfuscation, renaming and everything to do with such has been removed from Sputnik (so full source is now viewable) however Sputnik will maintain embedding .dlls in its .exe since they are third party support dlls and are not &amp;quot;Spuntik___.dll&amp;quot;s (such as mysql.data.dll) as such they will be kept inside the .exe since it is rather pointless not to keep them there since then there is less dlls to give with a compiled script (same goes for Sputnik.dll)&lt;br /&gt;
* Due to lack of Linux/Mac users (zero infact) Sputnik will no longer support them forever I kept Sputnik having support for them platforms for a long time and even came back to it after it was briefly removed however this time it is final there just nobody who uses it on them platforms...&lt;br /&gt;
* The Sputnik GUI IDE which is used to create GUI scripts easily now has all its source code included in the Examples folder as another good example of Sputnik&lt;br /&gt;
* Removed the &amp;quot;Goto&amp;quot; statement as a result Switch/Select now use &amp;quot;continue _name;&amp;quot; instead of &amp;quot;goto _name;&amp;quot;&lt;br /&gt;
* You can now use &amp;amp; to pass variables by ref when using ... in a function like &amp;quot;function test(...&amp;amp;$numbers)&amp;quot;&lt;br /&gt;
* Fixed a bug where &amp;quot;test(...$a);&amp;quot; wouldnt work but &amp;quot;test2(...$a, 7);&amp;quot; would since the parser considers (&amp;lt;ONE OBJECT&amp;gt;) to be the different&lt;br /&gt;
* As a result of the above fix stuff that gets surrounded in (((((()))))) should now get resolved properly (sputnik now peels back the () layers to reveal the item itself)&lt;br /&gt;
* Operator overloads are a bit faster&lt;br /&gt;
* Class magic functions, operator overloads and iterator functions are now thread safe however only one thread at a time can use the SAME function (multiple threads can use multiple magic functions sure but only one can use the same function at a time)&lt;br /&gt;
* Fixed a typo in &amp;quot;NBTCompoundReadFile&amp;quot; that would make it ignore the compression flag&lt;br /&gt;
* Fixed the same typo that also affected &amp;quot;NBTCompoundWriteFile&amp;quot;&lt;br /&gt;
* Improved safety of NBTCompoundWriteFile and made it even more reliable (it even checks the written bytes)&lt;br /&gt;
* List() now supports iterator classes&lt;br /&gt;
* List() is now slightly faster&lt;br /&gt;
* You can no longer use &amp;quot;strings&amp;quot; on break/continue statements and must instead provide an identifier like &amp;quot;continue test;&amp;quot;&lt;br /&gt;
* You can no longer use (  ) on break/continue statements and they now only accept either no params, an identifier or a variable/decimal etc if you do not provide an identifier then you will be expected to provide something that resolves to an integer&lt;br /&gt;
* You can now continue to a named label like &amp;quot;continue('labelName');&amp;quot; and it will redo the label block similar to how you can break from named labels well this lets you redo the named label similar to how java handles named labels&lt;br /&gt;
* You can  now do a &amp;quot;try{}&amp;quot; by itself and you do not need to include any &amp;quot;catch&amp;quot; statements this allows for quick and easy &amp;quot;try&amp;quot; statements you can still include a &amp;quot;finally&amp;quot; statement at the end if you wish&lt;br /&gt;
* Fixed a minor glitch in &amp;quot;try&amp;quot; where if the exception variable was somehow not an &amp;quot;exception class&amp;quot; Sputnik could crash&lt;br /&gt;
* You can now use &amp;quot;try&amp;quot; like a &amp;quot;using&amp;quot; statement using the new &amp;quot;()&amp;quot; braces for example &amp;quot;try($a = new test()) { }&amp;quot; everything inside the &amp;quot;()&amp;quot; will get an unset() once the try is finished (after the finally if there is one) this allows like a combination of &amp;quot;try&amp;quot; and &amp;quot;using&amp;quot; at the same time which is good for cleaning up after you&lt;br /&gt;
* Added a new &amp;quot;When&amp;quot; statement onto the &amp;quot;Catch&amp;quot; statement it works like so &amp;quot;Catch (Exception e) When ($a == 60)&amp;quot; it basically acts like an if statement and that individual catch is only triggered when the &amp;quot;when&amp;quot; statement is true you can of course use it without the exception info like &amp;quot;Catch When ($a == 10)&amp;quot;&lt;br /&gt;
* Added new function IsVarPointer() it basically does same thing IsVarPtr() and IsVarUPtr() do but both at same time&lt;br /&gt;
* GetVarType() now returns @TypeError on failure&lt;br /&gt;
* Added a second param to GetVarType() which when true allows the first param to be a string of name a type such as &amp;quot;binary&amp;quot; and then the function will return the type number from the string so now GetVarTypeName() has a reverse function&lt;br /&gt;
* &amp;quot;Continue&amp;quot; and &amp;quot;Break&amp;quot; statements no longer give an error immediately if the name they are looking for does not exist however the code will still fail&lt;br /&gt;
* Named blocks are now defined like &amp;quot;name:{}&amp;quot; instead of &amp;quot;name{}&amp;quot;&lt;br /&gt;
* Macro &amp;quot;@CaseState&amp;quot; now works properly for &amp;quot;Switch&amp;quot; statements&lt;br /&gt;
* Fixed a glitch in &amp;quot;Switch&amp;quot; statement where where ranges and regex would not work&lt;br /&gt;
* Fixed a bug where if the caseId was not found then a switch/select would loop forever&lt;br /&gt;
* Renamed &amp;quot;_default&amp;quot; to &amp;quot;_caseDefault&amp;quot; for Switch/Select&lt;br /&gt;
* Switch/Select that are nested etc will now properly destroy any continue to starting with &amp;quot;_case&amp;quot; so that it does not spread beyond the switch this does of course mean that you can only jump to/from the current switch/select and not into another nesting will not work for the jumps (same as before)&lt;br /&gt;
* Various improvements to &amp;quot;Switch&amp;quot; and &amp;quot;Select&amp;quot; they also now share the same code base (Select inherits Switch)&lt;br /&gt;
* Fixed a glitch in Named Blocks that could cause them to iterate forever&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.36 @ 19-12-2015 12:17 AM ==&lt;br /&gt;
* Fixed a bug where a while etc placed after a statement could cause an exception if there wasnt enough params&lt;br /&gt;
* Fixed a potential issue where modifying a string during a loop would cause a crash&lt;br /&gt;
* Fixed a potential issue where modifying a binary variable during a loop would cause a crash&lt;br /&gt;
* Fixed a bug where if you used unset() or something happened to unset the variable used in a foreach loop the loop would fail&lt;br /&gt;
* Fixed another bug in IsSet() also it properly handles refs and it returns false if an SV become an error data type&lt;br /&gt;
* Enum rule Flags TRUE now causes the first value to be 0 so you can set that as *none* etc&lt;br /&gt;
* Added PadSep() it is just a simple function that will create text with separators of a given count for example PadSep('N', '/', 4) will produce 'N/N/N/N' (without quotes)&lt;br /&gt;
* You can now define FLOAT hex literals using 0x30Ap&lt;br /&gt;
* You can now define DOUBLE hex literals using 0x30AP&lt;br /&gt;
* Oct() has been renamed to OctDec() so it is easier to see what it is doing&lt;br /&gt;
* OctDec() is now faster&lt;br /&gt;
* Added DecBin() to convert Decimal to Binary&lt;br /&gt;
* Added BinDec() to convert Binary to Decimal&lt;br /&gt;
* Fixed a bug in &amp;quot;ReturnCast&amp;quot; where it couldnt use regular types like Int64 etc&lt;br /&gt;
* Function rules &amp;quot;Returns/ReturnCast&amp;quot; can now be set to require a class type by name instead of just the usual types like Int32&lt;br /&gt;
* All functions now exexcute the &amp;quot;Return&amp;quot; statement if they are using &amp;quot;Returns&amp;quot; or &amp;quot;ReturnCast&amp;quot; flag and they did not execute the &amp;quot;Return&amp;quot; statement themselves&lt;br /&gt;
* Added a new rule to functions &amp;quot;Strict&amp;quot; that will disregard inherited classes and require a match on the main class name&lt;br /&gt;
* JSONDecode() can now correctly read raw true/false (the ones that arent quoted) such as {&amp;quot;active&amp;quot;:true}&lt;br /&gt;
* JSONEncode() now saves booleans as literal true/false (without quotes at all) instead of as a string&lt;br /&gt;
* Added new option to JSONEncode() called @JSON_STRING_BOOLEAN this will make booleans become literal &amp;quot;true&amp;quot; &amp;quot;false&amp;quot; strings if you dont use this option then booleans will be saved as literal true/false (without quotes at all)&lt;br /&gt;
* Added new option to JSONDecode() called @JSON_CHECK_STRING_BOOLEAN make it so any string that contains just &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot; (case insensitive) will become a literal boolean this wont slow down the decoding much since it only checks strings that are 4 or 5 chars in length&lt;br /&gt;
* A string casting as a bool is now true if it contains &amp;quot;TrUe&amp;quot; etc case no longer cares for case&lt;br /&gt;
* Changed internals of the &amp;quot;object&amp;quot; variable type cleaned it up alot there is now interfaces for casting on objects so anything can do it not just classes etc (will prove useful for future object types)&lt;br /&gt;
* VarObjTypeToString() function deleted&lt;br /&gt;
* VarObjTypeFromString() function deleted&lt;br /&gt;
* GetVarOBJTypeName() function deleted&lt;br /&gt;
* GetVarOBJType() function deleted&lt;br /&gt;
* IsVarObj (param 2 removed)&lt;br /&gt;
* Count() no longer returns null when used on a class that does not contain the count property (return 0 instead) same goes for other fails&lt;br /&gt;
* Objects when cast as a string now return their type and default &amp;quot;ToString&amp;quot; function output if the object does not have a Sputnik string returner&lt;br /&gt;
* The (binary) cast on an array is now recursive&lt;br /&gt;
* Added &amp;quot;Synchronized&amp;quot; flag to functions it can be used to specify only one instance of that function can be executing at a time (regardless of how many threads want to)&lt;br /&gt;
* ThreadCreate() accepts function(){} instead of a string&lt;br /&gt;
* HotKeySet() accepts function(){} instead of a string&lt;br /&gt;
* Added new function FMod()&lt;br /&gt;
* Added new internal class &amp;quot;Serializable&amp;quot; it can be used to custom handle a class in Serialize() and Unserialize()&lt;br /&gt;
* You can now use () braces in List() params it will grab a variable and set its value like &amp;quot;list( ($this-&amp;gt;$cat) ) = $arr;&amp;quot; this is useful since you can use the () braces to set any variable even static :: variables etc where as before you could only set a named global/local variable the reason it has to use the () braces and not work without it is because of the way the param system was designed a long time ago however it is expected most people would try to () brace if their first idea of not using braces didnt work (it is logical to assume braces might help)&lt;br /&gt;
* Operators [] and []! and [&amp;lt;&amp;gt;] and [&amp;lt;=&amp;gt;] for arrays now work on ref arrays without needing to * resolve the ref (not every operator in Sputnik should resolve the ref however these ones are specific to arrays and should work on ref arrays to be logical just like [index] does)&lt;br /&gt;
* Added new internal class &amp;quot;Traversable&amp;quot; it is simply used to check if a given class can be used in a foreach loop you cant use &amp;quot;Traversable&amp;quot; by itself and it must be used with a built in thing&lt;br /&gt;
* Added new internal class &amp;quot;Iterator&amp;quot; (it inherits Traversable) it can be used on a class and provides 3 functions &amp;quot;Valid()&amp;quot; should check if the current position is valid (so it lets you allow null returns) &amp;quot;Rewind()&amp;quot; should reset the position back to start and &amp;quot;Next()&amp;quot; should return the next element from the iterator and finally &amp;quot;Key()&amp;quot; should give the current key either as a number or string (the key will always be converted to a string) all this is for use with the foreach() loop as a side note the foreach() loop runs the &amp;quot;Rewind()&amp;quot; function before it starts the loop&lt;br /&gt;
* Added new function IteratorToArray() it does exactly what the name says converts a class that inherits &amp;quot;Iterator&amp;quot; into an array with optional key grab or just values&lt;br /&gt;
* Fixed a bug is IsSet() it was not using &amp;quot;return true/false&amp;quot; properly and would return TRUE if you returned false (since you didnt return null)&lt;br /&gt;
* Added a simple chat only Hotline Server to the Examples folder it has a better protocol implementation than the client does and is more accurate and improved the HotlineClient example a bit&lt;br /&gt;
* Added new example The Long Dark trainer this trainer demonstrates how to use CheatEngine scripts with Sputnik without having CheatEngine installed and never using CheatEngine at all (Using SputnikAsm.dll)&lt;br /&gt;
* Improved InArray() a bit&lt;br /&gt;
* Added ... for variadic functions it is used to provide easier usage of infinite arg functions &amp;quot;function f($req, $opt = null, ...$params)&amp;quot; once the function reaches $params (or any name you want) it will push all the remaining params into it and send it as an array to the function you can also do type based like &amp;quot;function f($req, $opt = null, int ...$params)&amp;quot;&lt;br /&gt;
* Added ... for variadic functions but this time as a call param for example &amp;quot;add(1, ...$operators);&amp;quot; will unpack $operators array or iterable class into arguments of the function&lt;br /&gt;
* Fixed a bug where if a function call ended in failure (major error) the stack wouldnt be popped&lt;br /&gt;
* Added new function HashEquals() it will compare an expected hash to an input hash make sure its valid it will also check they both the same size and what not for use with crypt() and other such hash functions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.35 @ 29-09-2015 12:17 AM ==&lt;br /&gt;
* Bitwise string stuff no longer casts each string char as a byte (thus losing data if its unicode) so it now correctly works with Sputniks unicode strings&lt;br /&gt;
* Fixed a bug where the list of classes a class inherits may get disordered resulting in some interesting things to happen&lt;br /&gt;
* Greatly improved speed of class magic functions: JsonSerialize() ShouldJsonSerialize() __Set() _Get() __IsSet() __Unset()&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would not call the class function __IsSet() with first param as 'Bar' at all&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a bug where unset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a glitch where if there is no class function __Unset() and you did unset($a['Bar']); it would try unset the elemnent&lt;br /&gt;
* Parent::FunctionName() will no longer give an error if you inherited more than one class and will instead use the first inherited class to locate the function if it is not found on the first it wil try the second and so on until it finds it&lt;br /&gt;
* Renamed function Use() to PluginLoad()&lt;br /&gt;
* Renamed function Unuse() to PluginUnload()&lt;br /&gt;
* Removed function TokenClass()&lt;br /&gt;
* Removed function IsToken()&lt;br /&gt;
* The parser no longer needs to use TokenClass()/IsToken() or ObjToVar() and as a result is more user friendly also it doesnt require pointers anymore (the calc example has been updated to show this change)&lt;br /&gt;
* Fixed a minor issue where Parse() might not return NULL on a certain failure&lt;br /&gt;
* You no longer need to have the __Construct() { } as an empty when using the parser you can now omit it entirely&lt;br /&gt;
* Renamed magic class function __call() to __invoke()&lt;br /&gt;
* Added magic class function __call() it has two arguments the first is a function name and the second is an array of params this will get called if you try call a class function that does not exist its name and arguments you tried to use will be passed to __call()&lt;br /&gt;
* Added magic class function __callStatic() it works similar to __call() but instead of working on an instance it works in static context only&lt;br /&gt;
* Call() no longer checks if you typed a static function&lt;br /&gt;
* CallArray() no longer checks if you typed a static function&lt;br /&gt;
* -&amp;gt;/=&amp;gt; no longer checks if you typed a static function&lt;br /&gt;
* class::function no longer tells you if you didnt type a static function&lt;br /&gt;
* self:: now shows an error if there is no self class found&lt;br /&gt;
* Removed requirements that enum (when using flags) values be divisible by 2 and and higher than 0 this means you get to decide what the number is and join multiple flags together however you should take care to make sure the number is valid&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on enums to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on functions to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Added UInteger() and the new cast (UInteger) for unsigned 64-bit integer (or highest available)&lt;br /&gt;
* You can now use the &amp;quot;Not&amp;quot; keyword instead of &amp;quot;!&amp;quot; for example if (NOT $a) is the same as if (!$a) &lt;br /&gt;
* You can now do $array .= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* You can now do $array ..= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* Fixed a bug where say(&amp;quot;CAT&amp;quot;) x 3 would print &amp;quot;CATCATCAT&amp;quot; instead of printing each one on a new line&lt;br /&gt;
* Fixed same bug as above this time time with xx instead of x&lt;br /&gt;
* You can now have infinite $ on your variable for use with Variable Variables like $$$$bar it will resolve each one&lt;br /&gt;
* Added IntDiv() it works like a normal $a / $b when using integers but does it in a function&lt;br /&gt;
* Added FDiv() it works like IntDiv() but for use with floating point numbers&lt;br /&gt;
* Fixed a bug where Switch() wasnt working properly with ranges and regex&lt;br /&gt;
* Fixed a bug in preprocessor where #predef and #unpredef would get confused by case now it is properly case insensitive&lt;br /&gt;
* Fixed a bug with the parser that caused the current instance of Sputnik to get lost on second parse when using preprocessor&lt;br /&gt;
* Fixed a bug where if you did a function name with no brackets like test; the &amp;quot;;&amp;quot; symbol would be used as its *first and only* param this has been fixed so now ; is omitted from any call this also means you can no longer use ; as a computable value&lt;br /&gt;
* As a result of the above fix you can now use redo; properly again in try/catch/finally&lt;br /&gt;
* You can now omit the ( ) when doing &amp;quot;my $Func = Function() { printr @Args; };&amp;quot; like so &amp;quot;my $Func = Function { printr @Args; };&amp;quot; this will cause the Args rule to set to TRUE automatically so you dont need to type it&lt;br /&gt;
* Added new macro @ArgCount this contains the number elements in @Args for functions with infinite params @ArgCount is basically Count(@Args)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.34 @ 24-09-2015 05:45 AM ==&lt;br /&gt;
* Unknown (was lost somehow)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.33 @ 20-09-2015 05:55 PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Main_Page"/>
				<updated>2016-04-07T09:01:38Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik Programming Language ==&lt;br /&gt;
&lt;br /&gt;
* [[What is Sputnik|What is Sputnik?]]&lt;br /&gt;
* [[The Team|The Team]]&lt;br /&gt;
* [[Language Reference|Language Reference]]&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
* [[Class Reference|Class Reference]]&lt;br /&gt;
* [[Version History|Version History]]&lt;br /&gt;
&lt;br /&gt;
Warning; Information on the wiki may not always be accurate to current downloadable version of Sputnik.&lt;br /&gt;
&lt;br /&gt;
However effort is taken to keep Sputnik compatible with older versions and any changes to that are for the better good overall.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
&lt;br /&gt;
[http://ubersoft.org/download/Sputnik37.rar Sputnik 0.37]&lt;br /&gt;
&lt;br /&gt;
(Extract download with [http://www.rarlab.com/download.htm WinRAR] 5.0 or higher)&lt;br /&gt;
&lt;br /&gt;
=== Contact ===&lt;br /&gt;
&lt;br /&gt;
UberFoX - Lead Programmer&lt;br /&gt;
&lt;br /&gt;
[mailto:uberfox@hotmail.com uberfox@hotmail.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Intro]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Function_Reference</id>
		<title>Function Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Function_Reference"/>
				<updated>2015-12-20T07:54:13Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* NBTTagCompound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Function Reference ==&lt;br /&gt;
&lt;br /&gt;
=== How to create a Function ===&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Core Functions ===&lt;br /&gt;
&lt;br /&gt;
If a link is red (unclickable) the function either doesnt exist yet and is pending creation or it has been created but does not yet have a page/example.&lt;br /&gt;
&lt;br /&gt;
==== Language Features ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Translation|&amp;lt;Expression&amp;gt; =~ tr/searchList/replacementList/flags]] -- Translate characters from one character set to another similar to StrTr() function&lt;br /&gt;
* [[Core Function Regex Match|&amp;lt;Expression&amp;gt; =~ m/pattern/flags]] -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups&lt;br /&gt;
* [[Core Function Regex Replace|&amp;lt;Expression&amp;gt; =~ s/pattern/replacement/flags]] -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups&lt;br /&gt;
* [[Core Function Goto Label|Goto Label; &amp;amp; Label:]] -- Jump to another section of the script&lt;br /&gt;
* [[Core Function List|&amp;lt;Scope&amp;gt; List( &amp;lt;expressions&amp;gt;, .. ) = &amp;lt;array&amp;gt;]] -- Extract some elements from an array into ready to use variables&lt;br /&gt;
* [[Core Function Pointer Read/Write Bracket|$ptr[&amp;lt;index&amp;gt;]:&amp;lt;type&amp;gt; = &amp;lt;value&amp;gt;]] -- Read and Write to memory pointers similar to PTRRead() and PTRWrite() but using [] to simulate like it's an array&lt;br /&gt;
* [[Core Function Array Splicing|Array Splicing]] -- Copy parts out of an array and return them as a new array&lt;br /&gt;
* [[Core Function Function Variables|Function Variables]] -- Dynamically create function source code and place it in a variable and call it from the variable&lt;br /&gt;
&lt;br /&gt;
===== Parser Engine =====&lt;br /&gt;
* [[Core Function Parser Engine|Parser Engine]] -- Parse text and have classes created and returned to you&lt;br /&gt;
* [[Core Function Parser|Parser( &amp;lt;grammar&amp;gt;, &amp;lt;tokenName&amp;gt;, &amp;lt;trimRules&amp;gt; )]] -- Create a new parser&lt;br /&gt;
* [[Core Function Parse|Parse( &amp;lt;parser&amp;gt;, &amp;lt;text&amp;gt; )]] -- Parse text with a parser created with Parser()&lt;br /&gt;
* [[Core Function IsToken|IsToken( &amp;lt;object&amp;gt; )]] -- Check if a given object is a token created from the parser&lt;br /&gt;
* [[Core Function TokenClass|TokenClass( &amp;lt;token&amp;gt; )]] -- Get the class the token is linked to&lt;br /&gt;
&lt;br /&gt;
==== Console Functions ====&lt;br /&gt;
* [[Core Function Print|Echo( )]] -- Alias for [[Core Function Print|Print( )]]&lt;br /&gt;
* [[Core Function Println|Say( )]] -- Alias for [[Core Function Println|Println( )]]&lt;br /&gt;
* [[Core Function Print|Print( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window&lt;br /&gt;
* [[Core Function Println|Println( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window and inserts a newline character at the end.&lt;br /&gt;
* [[Core Function Printf|Printf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) &lt;br /&gt;
* [[Core Function VPrintf|VPrintf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) using an array as the parameters &lt;br /&gt;
* [[Core Function PrintfC|PrintfC( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Print a formatted string to the console window&lt;br /&gt;
* [[Core Function Input|Input( &amp;lt;prompt&amp;gt; )]] -- Capture a string typed to console window&lt;br /&gt;
* [[Core Function InputC|InputC( &amp;lt;prompt/flag&amp;gt; )]] -- Capture a char (or info about the char) typed to console window&lt;br /&gt;
* [[Core Function Pause|Pause( &amp;lt;expression&amp;gt; )]] -- Pause the execution of the script on the console window until any key is pressed&lt;br /&gt;
* [[Core Function ConsoleClear|Cls( )]] -- Alias for [[Core Function ConsoleClear|ConsoleClear( )]]&lt;br /&gt;
* [[Core Function ConsoleClear|ConsoleClear( )]] -- Clear all text from the console window&lt;br /&gt;
* [[Core Function ConsoleKeyAvailable|ConsoleKeyAvailable( )]] -- Check if there is a key ready to be read from the console &lt;br /&gt;
* [[Core Function ConsoleCapsLock|ConsoleCapsLock( )]] -- Check if caps lock is down on the console &lt;br /&gt;
* [[Core Function ConsoleSetCursor|ConsoleSetCursor( &amp;lt;posX&amp;gt;, &amp;lt;posY&amp;gt; )]] -- Set the cursor position on the console&lt;br /&gt;
* [[Core Function ConsoleSetBuffer|ConsoleSetBuffer( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console text buffer size&lt;br /&gt;
* [[Core Function ConsoleSetSize|ConsoleSetSize( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console window size&lt;br /&gt;
* [[Core Function ConsoleHide|ConsoleHide( )]] -- Hide the console window&lt;br /&gt;
* [[Core Function ConsoleShow|ConsoleShow( )]] -- Show the console window&lt;br /&gt;
* [[Core Function ConsoleState|ConsoleState( )]] -- Get the console state (Visible, Hidden)&lt;br /&gt;
* [[Core Function ConsoleBeep|ConsoleBeep( &amp;lt;freq&amp;gt;, &amp;lt;duration&amp;gt; )]] -- Plays the sound of a beep of a specified frequency and duration through the console speaker&lt;br /&gt;
* [[Core Function ConsoleSeek|ConsoleSeek( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Set the position of the console cursor&lt;br /&gt;
* [[Core Function ConsoleBackColour|ConsoleBackColour( &amp;lt;colour&amp;gt; )]] -- Set the background (behind text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleForeColour|ConsoleForeColour( &amp;lt;colour&amp;gt; )]] -- Set the foreground (text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleBufferWidth|ConsoleBufferWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer width of the console window&lt;br /&gt;
* [[Core Function ConsoleBufferHeight|ConsoleBufferHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer height of the console window&lt;br /&gt;
* [[Core Function ConsoleWidth|ConsoleWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the width of the console window&lt;br /&gt;
* [[Core Function ConsoleHeight|ConsoleHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the height of the console window&lt;br /&gt;
* [[Core Function ConsoleTitle|ConsoleTitle( &amp;lt;newtitle&amp;gt; )]] -- Get or Set the title of the console window&lt;br /&gt;
* [[Core Function ConsoleCursorLeft|ConsoleCursorLeft( &amp;lt;newval&amp;gt; )]] -- Gets or sets the column position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorTop|ConsoleCursorTop( &amp;lt;newval&amp;gt; )]] -- Gets or sets the row position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorSize|ConsoleCursorSize( &amp;lt;newval&amp;gt; )]] -- Gets or sets the height of the cursor within a character cell&lt;br /&gt;
* [[Core Function ConsoleCursorVisible|ConsoleCursorVisible( &amp;lt;newval&amp;gt; )]] -- Gets or sets a value indicating whether the cursor is visible&lt;br /&gt;
* [[Core Function CGIConsole|CGIConsole( )]] -- Changes the console printing to work best a CGI instead of stand alone terminal&lt;br /&gt;
&lt;br /&gt;
==== Multi-Threading Functions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ThreadCreate|ThreadCreate( &amp;lt;name&amp;gt;, &amp;lt;function&amp;gt;, &amp;lt;extra&amp;gt; )]] -- Create a new thread and start it off executing a function or some code&lt;br /&gt;
* [[Core Function ThreadSleep|ThreadSleep( &amp;lt;name&amp;gt; )]] -- Freeze a thread and make it sleep&lt;br /&gt;
* [[Core Function ThreadResume|ThreadResume( &amp;lt;name&amp;gt; )]] -- Unfreeze a thread and allow it to continue execution&lt;br /&gt;
* [[Core Function ThreadState|ThreadState( &amp;lt;name&amp;gt; )]] -- Returns state of a thread&lt;br /&gt;
* [[Core Function ThreadKill|ThreadKill( &amp;lt;name&amp;gt; )]] -- Terminate a thread and remove it from the script&lt;br /&gt;
* [[Core Function ThreadExists|ThreadExists( &amp;lt;name&amp;gt; )]] -- Check if a thread exists by this name&lt;br /&gt;
* [[Core Function ThreadName|ThreadName( )]] -- Returns the name of the current thread that is executing this code&lt;br /&gt;
* [[Core Function ThreadLock|ThreadLock( &amp;lt;lockname&amp;gt; ) {}]] -- Locks a given section of code allowing only one thread to execute it at a time&lt;br /&gt;
* [[Core Function Threads|Threads( )]] -- Return an array of all threads&lt;br /&gt;
&lt;br /&gt;
==== Variable Type Conversions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Bool|Bool( &amp;lt;expression&amp;gt; )]] -- Returns the TRUE(1) or FALSE(0) representation of an expression&lt;br /&gt;
* [[Core Function Char|Char( &amp;lt;expression&amp;gt; )]] -- Returns the single letter representation of an expression&lt;br /&gt;
* [[Core Function Byte|Byte( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function SByte|SByte( &amp;lt;expression&amp;gt; )]] -- Returns the signed 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Short|Short( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int16|Int16( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int32|Int32( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int|Int( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int64|Int64( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Long|Long( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UShort|UShort( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt16|UInt16( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt32|UInt32( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt|UInt( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt64|UInt64( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function ULong|ULong( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Ptr|Ptr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function IntPtr|IntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function UPtr|UPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function UIntPtr|UIntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function Float|Float( &amp;lt;expression&amp;gt; )]] -- Returns the 32-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function Double|Double( &amp;lt;expression&amp;gt; )]] -- Returns the 64-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function String|String( &amp;lt;expression&amp;gt; )]] -- Returns the String representation of an expression&lt;br /&gt;
* [[Core Function Ascii|Ascii( &amp;lt;expression&amp;gt; )]] -- Returns the String (In raw ASCII) representation of an expression&lt;br /&gt;
* [[Core Function Binary|Binary( &amp;lt;expression&amp;gt; )]] -- Returns the Binary (raw bytes) representation of an expression&lt;br /&gt;
&lt;br /&gt;
==== Common Variable Functions ====&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function IsSet|IsSet( $variable )]] -- Determine if a variable is set and is not NULL&lt;br /&gt;
* [[Core Function Unset|Unset( $variable )]] -- Delete a variable&lt;br /&gt;
* [[Core Function Ref|Ref( $variable )]] -- Retrieve the variable at the lowest depth in references that the current variable links to&lt;br /&gt;
* [[Core Function IsDeclared|IsDeclared( &amp;lt;variable name&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a variable has been declared&lt;br /&gt;
* [[Core Function Printr|Printr( $variable, &amp;lt;newline&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Prints all details about a variable in a way thats easy for humans to read it (Will print arrays etc)&lt;br /&gt;
* [[Core Function VarDump|VarDump( $variable, &amp;lt;newline&amp;gt; )]] -- Dumps information about a variable&lt;br /&gt;
* [[Core Function Assign|Assign( &amp;lt;varname&amp;gt;, &amp;lt;data&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Assigns a variable by name with the data&lt;br /&gt;
* [[Core Function Atof|Atof( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Double&lt;br /&gt;
* [[Core Function Atoi|Atoi( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int32&lt;br /&gt;
* [[Core Function Atol|Atol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToTol|StrTol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToToul|StrToul( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to UInt64&lt;br /&gt;
* [[Core Function IsNan|IsNan( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is NaN (Not a number)&lt;br /&gt;
* [[Core Function IsInf|IsInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Infinity&lt;br /&gt;
* [[Core Function IsPosInf|IsPosInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Positive-Infinity&lt;br /&gt;
* [[Core Function IsNegInf|IsNegInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Negative-Infinity&lt;br /&gt;
* [[Core Function IsNormal|IsNormal( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is neither NaN, PosInf, NegInf or Inf&lt;br /&gt;
* [[Core Function SignBit|SignBit( &amp;lt;variable&amp;gt; )]] -- Returns whether the sign of a variable is negative&lt;br /&gt;
&lt;br /&gt;
===== Type Checking =====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function isVar|isVar( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Checks if a variable is a type (as a string) or inherits from a type (if not strict) (the same as $a ~~ Type)&lt;br /&gt;
* [[Core Function isVarChar|isVarChar( $variable )]] -- Checks if a variable is a char type&lt;br /&gt;
* [[Core Function isVarBool|isVarBool( $variable )]] -- Checks if a variable is a boolean type&lt;br /&gt;
* [[Core Function isVarByte|isVarByte( $variable )]] -- Checks if a variable is an unsigned 8-bit integer type&lt;br /&gt;
* [[Core Function isVarSByte|isVarSByte( $variable )]] -- Checks if a variable is a signed 8-bit integer type&lt;br /&gt;
* [[Core Function isVarShort|isVarShort( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt16|isVarInt16( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt|isVarInt( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt32|isVarInt32( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt64|isVarInt64( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarLong|isVarLong( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarUShort|isVarUShort( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt16|isVarUInt16( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt|isVarUInt( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt32|isVarUInt32( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt64|isVarUInt64( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarULong|isVarULong( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarFloat|isVarFloat( $variable )]] -- Checks if a variable is a single precision floating point type&lt;br /&gt;
* [[Core Function isVarFP|isVarFP( $variable )]] -- Checks if a check if a variable type is only a float/double nothing else&lt;br /&gt;
* [[Core Function isVarDouble|isVarDouble( $variable )]] -- Checks if a variable is a double precision floating point type&lt;br /&gt;
* [[Core Function isVarPtr|isVarPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarIntPtr|isVarIntPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarUPtr|isVarUPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarUIntPtr|isVarUIntPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarString|isVarString( $variable )]] -- Checks if a variable is a string type&lt;br /&gt;
* [[Core Function isVarNumber|isVarNumber( $variable )]] -- Checks if a variable is any integer or float/double type&lt;br /&gt;
* [[Core Function isVarNull|isVarNull( $variable )]] -- Checks if a variable is null&lt;br /&gt;
* [[Core Function isVarBinary|isVarBinary( $variable )]] -- Checks if a variable is a binary type&lt;br /&gt;
* [[Core Function isVarFunction|isVarFunction( $variable )]] -- Checks if a variable is a function type&lt;br /&gt;
* [[Core Function isVarRef|isVarRef( $variable )]] -- Check if a variable is an reference to another variable&lt;br /&gt;
* [[Core Function isVarArray|isVarArray( $variable )]] -- Check if a variable is an array&lt;br /&gt;
* [[Core Function isVarObj|isVarObj( $variable, &amp;lt;type&amp;gt; )]] -- Check if a variable is an object type (This includes classes, file handles etc)&lt;br /&gt;
* [[Core Function isVarClass|isVarClass( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Check if a variable's object type is a class&lt;br /&gt;
* [[Core Function isVarDLLStruct|isVarDLLStruct( $variable )]] -- Check if a variable holds a DLLStruct&lt;br /&gt;
* [[Core Function isVarServer|isVarServer( $variable )]] -- Check if a variable holds a Server object from Listen()&lt;br /&gt;
* [[Core Function isVarClient|isVarClient( $variable )]] -- Check if a variable holds a Client object from Connect()&lt;br /&gt;
* [[Core Function isVarClientSocket|isVarClientSocket( $variable )]] -- Check if a variable holds a Client socket object&lt;br /&gt;
* [[Core Function isVarSocket|isVarSocket( $variable )]] -- Check if a variable holds a Socket object&lt;br /&gt;
* [[Core Function isVarSigned|isVarSigned( $variable )]] -- Check if a variable holds a signed integer&lt;br /&gt;
* [[Core Function isVarUnsigned|isVarUnsigned( $variable )]] -- Check if a variable holds an unsigned integer&lt;br /&gt;
&lt;br /&gt;
====== Get Type Directly ======&lt;br /&gt;
* [[Core Function GetVarType|GetVarType( $variable )]] -- Get the common type of a variable&lt;br /&gt;
* [[Core Function GetVarTypeName|GetVarTypeName( $variable )]] -- Get the common type of a variable (as a string)&lt;br /&gt;
* [[Core Function GetVarObjType|GetVarObjType( $variable )]] -- Get the common object type of a variable (If it is an object)&lt;br /&gt;
* [[Core Function GetVarObjTypeName|GetVarObjTypeName( $variable )]] -- Get the common object type of a variable (If it is an object) and return it as string&lt;br /&gt;
&lt;br /&gt;
==== Binary Data Management Functions ====&lt;br /&gt;
* [[Core Function Bin|Bin( &amp;lt;args&amp;gt; )]] -- Create a new binary variable&lt;br /&gt;
* [[Core Function Op|Op( &amp;lt;opCodes&amp;gt; )]] -- Create a new binary variable from a string of opCodes such as &amp;quot;AA 10 20&amp;quot;&lt;br /&gt;
* [[Core Function BinaryCreate|BinaryCreate( &amp;lt;size&amp;gt;, &amp;lt;fill&amp;gt; )]] -- Create a new binary variable and its array size and fill data type &lt;br /&gt;
* [[Core Function BinaryClone|BinaryClone( &amp;lt;binary-array&amp;gt; )]] -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one&lt;br /&gt;
* [[Core Function BinaryContains|BinaryContains( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* [[Core Function BinaryCRC32|BinaryCRC32( &amp;lt;binary-array&amp;gt; )]] -- Calculates the crc32 polynomial of a binary array&lt;br /&gt;
* [[Core Function BinaryWipe|BinaryWipe( &amp;lt;binary-array&amp;gt; )]] -- Wipes a binary variables data 100% and sets the variable to a blank int containing null&lt;br /&gt;
* [[Core Function BinaryFill|BinaryFill( &amp;lt;binary-array&amp;gt;, &amp;lt;fillWith&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Fill a binary variables data (replace all of it or part of it) with a given byte or zero&lt;br /&gt;
* [[Core Function BinaryStr|BinaryStr( &amp;lt;binary-array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Create a Hex string from a binary array&lt;br /&gt;
* [[Core Function BinaryHex|BinaryHex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a binary array from a hex string&lt;br /&gt;
* [[Core Function BinaryLen|BinaryLen( &amp;lt;binary-array&amp;gt;, &amp;lt;newLen&amp;gt; )]] -- Returns the number of bytes in a binary variable (or increase it's capacity for bytes)&lt;br /&gt;
* [[Core Function BinaryGet|BinaryGet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinarySet|BinarySet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinaryReverse|BinaryReverse( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Reverse the order bytes a binary variable&lt;br /&gt;
* [[Core Function BinaryRemove|BinaryRemove( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Remove bytes from a binary variable&lt;br /&gt;
* [[Core Function BinaryExpand|BinaryExpand( &amp;lt;binary-array&amp;gt; )]] -- Expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable&lt;br /&gt;
* [[Core Function BinaryStartsWith|BinaryStartsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable starts with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryEndsWith|BinaryEndsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable ends with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryIndexOf|BinaryIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryIndexOfAny|BinaryIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryLastIndexOf|BinaryLastIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryLastIndexOfAny|BinaryLastIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryRandom|BinaryRandom( &amp;lt;binary-array&amp;gt;, &amp;lt;seed&amp;gt; )]] -- Randomize all bytes in a binary variable&lt;br /&gt;
* [[Core Function BinaryReplace|BinaryReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;maxReplacements&amp;gt; )]] -- Search for a byte or string of bytes in a binary variable and replace it&lt;br /&gt;
* [[Core Function BinaryHash|BinaryHash( &amp;lt;binary-array&amp;gt; )]] -- Gain a unique Hash of the bytes in this binary variable&lt;br /&gt;
* [[Core Function BinaryMid|BinaryMid( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Create a binary variable by extracting a number of bytes from another binary variable&lt;br /&gt;
* [[Core Function BinaryMidReplace|BinaryMidReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace a section (from start to length) of the binary with the replacement binary&lt;br /&gt;
* [[Core Function BinaryConcat|BinaryConcat( &amp;lt;destination/array&amp;gt;, &amp;lt;values&amp;gt; )]] -- Mass append a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryJoin|BinaryJoin( &amp;lt;separator&amp;gt;, &amp;lt;values&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] -- Create a new Binary by joining together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryAppend|BinaryAppend( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Append a binary variables data onto the end or beginning of another binary variables data&lt;br /&gt;
* [[Core Function BinaryInsert|BinaryInsert( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;overwrite&amp;gt; )]] -- Insert a binary variables data into another binary variable at a specific location&lt;br /&gt;
* [[Core Function BinaryUnshift|BinaryUnshift( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the beginning of a binary variable&lt;br /&gt;
* [[Core Function BinaryPush|BinaryPush( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the end of a binary variable&lt;br /&gt;
* [[Core Function BinaryShift|BinaryShift( &amp;lt;binary-array&amp;gt; )]] -- Delete the first byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryPop|BinaryPop( &amp;lt;binary-array&amp;gt; )]] -- Delete the last byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryResize|BinaryResize( &amp;lt;binary-array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;data&amp;gt; )]] -- Resize a binary variables data array&lt;br /&gt;
* [[Core Function BinaryPadLeft|BinaryPadLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Left pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinaryPadRight|BinaryPadRight( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Right pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinarySHA1|BinarySHA1( &amp;lt;binary-array&amp;gt; )]] -- Returns the SHA1 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryFromStr|BinaryFromStr( &amp;lt;string&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new binary variable created from a strings raw bytes&lt;br /&gt;
* [[Core Function BinaryToStr|BinaryToStr( &amp;lt;binary-array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a new string containing the binary data as raw bytes&lt;br /&gt;
* [[Core Function BinaryMD5|BinaryMD5( &amp;lt;binary-array&amp;gt; )]] -- Returns the MD5 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryCompare|BinaryCompare( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;needle, &amp;lt;needleOffset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Compare two binary variables&lt;br /&gt;
* [[Core Function BinaryCompress|BinaryCompress( &amp;lt;binary-array&amp;gt; )]] -- Compress a binary variables data&lt;br /&gt;
* [[Core Function BinaryUncompress|BinaryUncompress( &amp;lt;binary-array&amp;gt; )]] -- Uncompress a binary variable data&lt;br /&gt;
* [[Core Function BinaryToLower|BinaryToLower( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to lowercase&lt;br /&gt;
* [[Core Function BinaryToUpper|BinaryToUpper( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to uppercase&lt;br /&gt;
* [[Core Function BinaryTrim|BinaryTrim( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left or right&lt;br /&gt;
* [[Core Function BinaryTrimLeft|BinaryTrimLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left&lt;br /&gt;
* [[Core Function BinaryTrimRight|BinaryTrimRight( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the right&lt;br /&gt;
* [[Core Function BinaryStripNull|BinaryStripNull( &amp;lt;binary-array&amp;gt; )]] -- Strip all NULL bytes (0x00) from a binary variable&lt;br /&gt;
* [[Core Function BinaryUUEncode|BinaryUUEncode( &amp;lt;binary-array&amp;gt; )]] -- Encodes a binary variable using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinaryUUDecode|BinaryUUDecode( &amp;lt;binary-array&amp;gt; )]] -- Decodes a binary variable that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinarySave|BinarySave( &amp;lt;binary-array&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Save a binary variable data to file&lt;br /&gt;
* [[Core Function BinaryLoad|BinaryLoad( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new binary variable by loading binary data from a file&lt;br /&gt;
&lt;br /&gt;
===== Binary packer/unpacker =====&lt;br /&gt;
* [[Core Function Pack|Pack( &amp;lt;format&amp;gt;, &amp;lt;args&amp;gt; )]] -- Pack data into a binary array&lt;br /&gt;
* [[Core Function Unpack|Unpack( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Unpack data from a binary array&lt;br /&gt;
* [[Core Function PackSingle|PackSingle( &amp;lt;format&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pack a single value into a binary array&lt;br /&gt;
* [[Core Function UnpackSingle|UnpackSingle( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;position&amp;gt; )]] -- Unpack a single value from a binary array optionally from a given index&lt;br /&gt;
&lt;br /&gt;
===== Bit Vector =====&lt;br /&gt;
* [[Core Function Vec|Vec( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;bits&amp;gt; )]] -- Treats binary variable as a bit vector made up of elements of width bits and returns the value of the element specified by offset as an unsigned integer and optionally sets bits in the string to a given value&lt;br /&gt;
&lt;br /&gt;
===== Bits =====&lt;br /&gt;
* [[Core Function SetBit|SetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the bit at a given index&lt;br /&gt;
* [[Core Function GetBit|GetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the bit at a given index&lt;br /&gt;
* [[Core Function InvertBit|InvertBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Invert the bit at a given index&lt;br /&gt;
* [[Core Function ClearBit|ClearBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Clear the bit at a given index&lt;br /&gt;
* [[Core Function FillBit|FillBit( &amp;lt;binary-array&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set all bits to the value&lt;br /&gt;
&lt;br /&gt;
===== BinHex 5.0 =====&lt;br /&gt;
* [[Core Function BinHexEncode|BinHexEncode( &amp;lt;name&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;creator&amp;gt;, &amp;lt;resourceFork&amp;gt;, &amp;lt;dataFork&amp;gt;, &amp;lt;flag1&amp;gt;, &amp;lt;flag2&amp;gt; )]] -- Encode data (usually a file) to BinHex 5.0 format&lt;br /&gt;
* [[Core Function BinHexDecode|BinHexDecode( &amp;lt;binhex-binary&amp;gt; )]] -- Decode data (usually a file) from BinHex 5.0 format&lt;br /&gt;
&lt;br /&gt;
===== ByteBuffer =====&lt;br /&gt;
The ByteBuffer is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc it works similar to the ByteBuffer in Java&lt;br /&gt;
* [[Core Function ByteBufferNew|ByteBufferNew( &amp;lt;nothing/capacity/binary/byteBuffer&amp;gt; )]] -- Make a new ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferGet|ByteBufferGet( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get data from a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPut|ByteBufferPut( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;variable&amp;gt; )]] -- Add data to a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPeek|ByteBufferPeek( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt; )]] -- Peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* [[Core Function ByteBufferGetBinary|ByteBufferGetBinary( &amp;lt;byteBuffer&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt; )]] -- Get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* [[Core Function ByteBufferCapacity|ByteBufferCapacity( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferRewind|ByteBufferRewind( &amp;lt;byteBuffer&amp;gt; )]] -- Set the position of a ByteBuffer back to the start&lt;br /&gt;
* [[Core Function ByteBufferLimit|ByteBufferLimit( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPosition|ByteBufferPosition( &amp;lt;byteBuffer&amp;gt;, &amp;lt;newPosition&amp;gt; )]] -- Get and set the position of a ByteBuffer to any value&lt;br /&gt;
* [[Core Function ByteBufferRemaining|ByteBufferRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferHasRemaining|ByteBufferHasRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferClear|ByteBufferClear( &amp;lt;byteBuffer&amp;gt; )]] -- Clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferFlip|ByteBufferFlip( &amp;lt;byteBuffer&amp;gt; )]] -- Flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferMark|ByteBufferMark( &amp;lt;byteBuffer&amp;gt; )]] -- Mark the position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferReset|ByteBufferReset( &amp;lt;byteBuffer&amp;gt; )]] -- Reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferCompare|ByteBufferCompare( &amp;lt;byteBuffer&amp;gt;, &amp;lt;byteBuffer&amp;gt; )]] -- Compare two ByteBuffers to see if they are equal&lt;br /&gt;
* [[Core Function ByteBufferClone|ByteBufferClone( &amp;lt;byteBuffer&amp;gt; )]] -- Clone a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferToBinary|ByteBufferToBinary( &amp;lt;byteBuffer&amp;gt; )]] -- Return a new binary variable from the data contained within the ByteBuffer&lt;br /&gt;
&lt;br /&gt;
===== NBT (Named Binary Tag) =====&lt;br /&gt;
Functions on par with Minecrafts NBT system but greatly expanded to include many additional features and improvements specific for Sputnik.&lt;br /&gt;
* [[Core Function NBT|NBT( &amp;lt;value&amp;gt; )]] -- Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* [[Core Function NBTNew|NBTNew( &amp;lt;nbt-type&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* [[Core Function NBTCompare|NBTCompare( &amp;lt;nbt&amp;gt;, &amp;lt;nbt&amp;gt; )]] -- Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* [[Core Function NBTCopy|NBTCopy( &amp;lt;nbt&amp;gt; )]] -- Make a clone of an NBT&lt;br /&gt;
* [[Core Function NBTGetId|NBTGetId( &amp;lt;nbt&amp;gt; )]] -- Get the ID type of an NBT&lt;br /&gt;
* [[Core Function NBTGetName|NBTGetName( &amp;lt;nbt&amp;gt; )]] -- Get the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTSetName|NBTGetName( &amp;lt;nbt&amp;gt;, &amp;lt;new-name&amp;gt; )]] -- Set the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTHash|NBTHash( &amp;lt;nbt&amp;gt; )]] -- Compute the CRC32 hash of an NBT&lt;br /&gt;
* [[Core Function NBTToString|NBTToString( &amp;lt;nbt&amp;gt; )]] -- Return a string representation of an NBT&lt;br /&gt;
* [[Core Function NBTToVar|NBTToVar( &amp;lt;nbt&amp;gt; )]] -- Return the Sputnik variable representation of an NBT&lt;br /&gt;
* [[Core Function IsVarNBT|IsVarNBT( &amp;lt;value&amp;gt; )]] -- Check if a variable is contains an NBT&lt;br /&gt;
&lt;br /&gt;
====== NBTTagCompound ======&lt;br /&gt;
* [[Core Function NBTCompoundClear|NBTCompoundClear( &amp;lt;nbtCompound&amp;gt; )]] -- Clear all tags&lt;br /&gt;
* [[Core Function NBTCompoundCount|NBTCompoundCount( &amp;lt;nbtCompound&amp;gt; )]] -- Return the amount of tags&lt;br /&gt;
* [[Core Function NBTCompoundGet|NBTCompoundGet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Get a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundSet|NBTCompoundSet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundGetKeys|NBTCompoundGetKeys( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all keys&lt;br /&gt;
* [[Core Function NBTCompoundGetTags|NBTCompoundGetTags( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all tags&lt;br /&gt;
* [[Core Function NBTCompoundGetMap|NBTCompoundGetMap( &amp;lt;nbtCompound&amp;gt; )]] -- Get an associative array of all keys and tags&lt;br /&gt;
* [[Core Function NBTCompoundHasKey|NBTCompoundHasKey( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Check if a given tag exists by name&lt;br /&gt;
* [[Core Function NBTCompoundIsEmpty|NBTCompoundIsEmpty( &amp;lt;nbtCompound&amp;gt; )]] -- Check if there are no tags&lt;br /&gt;
* [[Core Function NBTCompoundRemove|NBTCompoundRemove( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Remove a specific tag by name&lt;br /&gt;
* [[Core Function NBTCompoundWrite|NBTCompoundWrite( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundRead|NBTCompoundRead( &amp;lt;binary-variable/buffer&amp;gt; )]] -- Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundWriteFile|NBTCompoundWriteFile( &amp;lt;nbtCompound&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;compression&amp;gt; )]] -- Write the NBTTagCompound to a file&lt;br /&gt;
* [[Core Function NBTCompoundReadFile|NBTCompoundReadFile( &amp;lt;file&amp;gt;, &amp;lt;compression&amp;gt;  )]] -- Create a new NBTTagCompound from reading a file&lt;br /&gt;
* [[Core Function NBTCompoundCompress|NBTCompoundCompress( &amp;lt;nbtCompound&amp;gt; )]] -- Compress the NBTTagCompound to binary&lt;br /&gt;
* [[Core Function NBTCompoundDecompress|NBTCompoundDecompress( &amp;lt;binary-variable&amp;gt; )]] -- Decompress a NBTTagCompound from binary&lt;br /&gt;
* [[Core Function NBTCompoundWriteCompressed|NBTCompoundWriteCompressed( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* [[Core Function NBTCompoundReadCompressed|NBTCompoundReadCompressed( &amp;lt;buffer&amp;gt; )]] -- Decompress a NBTTagCompound from a buffer&lt;br /&gt;
&lt;br /&gt;
====== NBTTagList/NBTTagListEx ======&lt;br /&gt;
* [[Core Function NBTListAppend|NBTListAppend( &amp;lt;nbtList&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add an NBT to the end of the list&lt;br /&gt;
* [[Core Function NBTListCount|NBTListCount( &amp;lt;nbtList&amp;gt; )]] -- Return how many tags exist in the list&lt;br /&gt;
* [[Core Function NBTListGet|NBTListGet( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get a tag at the given index&lt;br /&gt;
* [[Core Function NBTListHasId|NBTListHasId( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an index is valid and contains a tag&lt;br /&gt;
* [[Core Function NBTListRemove|NBTListRemove( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
===== Misc Binary Functions =====&lt;br /&gt;
* [[Core Function TB|TB( &amp;lt;string&amp;gt; )]] -- Convert a string of up to 4 chars into a 32-Bit unsigned number (network order)&lt;br /&gt;
* [[Core Function BT|BT( &amp;lt;number&amp;gt; )]] -- Convert a 32-Bit unsigned number (network order) into a string&lt;br /&gt;
&lt;br /&gt;
==== Bit Flag Functions ====&lt;br /&gt;
* [[Core Function HasFlag|HasFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt; )]] -- Check if a flag (or array of flags) is enabled in a given enum instance&lt;br /&gt;
* [[Core Function HasFlagAny|HasFlagAny( &amp;lt;enumInst&amp;gt;, &amp;lt;flags&amp;gt;... )]] -- Check if any flag is enabled in a given enum instance&lt;br /&gt;
* [[Core Function SetFlag|SetFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt;, &amp;lt;state&amp;gt; )]] -- Enable or Disable a flag (or array of flags) in a given enum instance&lt;br /&gt;
&lt;br /&gt;
==== Math Functions ====&lt;br /&gt;
* [[Core Function Abs|Abs( &amp;lt;expression&amp;gt; )]] -- Calculates the absolute value of a number&lt;br /&gt;
* [[Core Function ACos|ACos( &amp;lt;expression&amp;gt; )]] -- Calculates the arcCosine of a number&lt;br /&gt;
* [[Core Function ASin|ASin( &amp;lt;expression&amp;gt; )]] -- Calculates the arcsine of a number&lt;br /&gt;
* [[Core Function ATan|ATan( &amp;lt;expression&amp;gt; )]] -- Calculates the arctangent of a number&lt;br /&gt;
* [[Core Function ATan2|ATan2( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Compute arc tangent with two parameters&lt;br /&gt;
* [[Core Function Angle2D|Angle2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Calculates the angle of a line defined by two points on a 2D surface&lt;br /&gt;
* [[Core Function Barycentric|Barycentric( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;amount1&amp;gt;, &amp;lt;amount2&amp;gt; )]] -- Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates&lt;br /&gt;
* [[Core Function CatmullRom|CatmullRom( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;value4&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Catmull-Rom interpolation using the specified positions&lt;br /&gt;
* [[Core Function BaseConv|BaseConv( &amp;lt;number&amp;gt;, &amp;lt;frombase&amp;gt;, &amp;lt;tobase&amp;gt; )]] -- Convert a number between arbitrary bases&lt;br /&gt;
* [[Core Function BitAND|BitAND( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise AND operation&lt;br /&gt;
* [[Core Function BitNOT|BitNOT( &amp;lt;expression&amp;gt; )]] -- Performs a bitwise NOT operation&lt;br /&gt;
* [[Core Function BitOR|BitOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise OR operation&lt;br /&gt;
* [[Core Function BitSHIFT|BitSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a bit shifting operation&lt;br /&gt;
* [[Core Function BitTripleSHIFT|BitTripleSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a triple bit shifting operation&lt;br /&gt;
* [[Core Function BitXOR|BitXOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise exclusive OR (XOR) operation&lt;br /&gt;
* [[Core Function BitROTATE|BitROTATE( &amp;lt;expression&amp;gt;, &amp;lt;shift&amp;gt;, &amp;lt;size&amp;gt; )]] -- Performs a bit shifting operation, with rotation&lt;br /&gt;
* [[Core Function BitSwap|BitSwap( &amp;lt;expression&amp;gt; )]] -- Byte-swap (little-endian &amp;lt;-&amp;gt; big-endian)&lt;br /&gt;
* [[Core Function Ceiling|Ceiling( &amp;lt;expression&amp;gt; )]] -- Returns a number rounded up to the next integer&lt;br /&gt;
* [[Core Function Clamp|Clamp( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Clamps the specified value&lt;br /&gt;
* [[Core Function Cos|Cos( &amp;lt;expression&amp;gt; )]] -- Calculates the cosine of a number&lt;br /&gt;
* [[Core Function Cosh|Cosh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic cosine of the specified angle&lt;br /&gt;
* [[Core Function DegreesToRadians|DegreesToRadians( &amp;lt;value&amp;gt; )]] -- Converts degrees to radians&lt;br /&gt;
* [[Core Function DegreesToRevolutions|DegreesToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts degrees to revolutions&lt;br /&gt;
* [[Core Function DiffCalc|DiffCalc( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;isDouble&amp;gt; )]] -- Calculates the difference between two values and returns information about it that can help you convert the first into the second for future needs&lt;br /&gt;
* [[Core Function Distance|Distance( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt; )]] -- Calculates the absolute value of the difference of two values&lt;br /&gt;
* [[Core Function Distance2D|Distance2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Finds the distance between two points on a 2D surface&lt;br /&gt;
* [[Core Function Distance3D|Distance3D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;z1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;z2&amp;gt; )]] -- Finds the distance between two points on a 3D surface&lt;br /&gt;
* [[Core Function Exp|Exp( &amp;lt;expression&amp;gt; )]] -- Returns e raised to the specified power&lt;br /&gt;
* [[Core Function Floor|Floor( &amp;lt;expression&amp;gt; )]] -- Returns the largest integer less than or equal to the specified number&lt;br /&gt;
* [[Core Function frexp|frexp( &amp;lt;x&amp;gt; )]] -- Returns m and e such that x = m2e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero)&lt;br /&gt;
* [[Core Function Gauss|Gauss( &amp;lt;amplitude&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;radX&amp;gt;, &amp;lt;radY&amp;gt;, &amp;lt;sigmaX&amp;gt;, &amp;lt;sigmaY&amp;gt; )]] -- Get the result of the Gaussian function&lt;br /&gt;
* [[Core Function GradiansToRevolutions|GradiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts gradians to revolutions&lt;br /&gt;
* [[Core Function GradiansToDegrees|GradiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts gradians to degrees&lt;br /&gt;
* [[Core Function GradiansToRadians|GradiansToRadians( &amp;lt;value&amp;gt; )]] -- Converts gradians to radians&lt;br /&gt;
* [[Core Function Hermite|Hermite( &amp;lt;value1&amp;gt;, &amp;lt;tangent1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;tangent2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Hermite spline interpolation&lt;br /&gt;
* [[Core Function IsDivisible|IsDivisible( &amp;lt;expression&amp;gt;, &amp;lt;divisor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* [[Core Function IsOdd|IsOdd( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an odd number&lt;br /&gt;
* [[Core Function IsEven|IsEven( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an even number&lt;br /&gt;
* [[Core Function IntToRom|IntToRom( &amp;lt;expression&amp;gt; )]] -- Returns the roman numerical value of an integer&lt;br /&gt;
* [[Core Function ldexp|ldexp( &amp;lt;m&amp;gt;, &amp;lt;n&amp;gt; )]] -- Returns the value of m * 2^n&lt;br /&gt;
* [[Core Function Lerp|Lerp( &amp;lt;from&amp;gt;, &amp;lt;to&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a linear function by a given amount&lt;br /&gt;
* [[Core Function Log|Log( &amp;lt;expression&amp;gt;, &amp;lt;newbase&amp;gt; )]] -- Returns the logarithm of a specified number&lt;br /&gt;
* [[Core Function Log10|Log10( &amp;lt;expression&amp;gt; )]] -- Returns the common (base-10) logarithm of a specified number&lt;br /&gt;
* [[Core Function Math|Math( &amp;lt;expression&amp;gt; )]] -- Parse a string containing mathematical equations&lt;br /&gt;
* [[Core Function Max|Max( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the greater number and return it&lt;br /&gt;
* [[Core Function Min|Min( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the lesser number and return it&lt;br /&gt;
* [[Core Function Mod|Mod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the modulus operation&lt;br /&gt;
* [[Core Function Modf|Modf( &amp;lt;x&amp;gt;, &amp;lt;intpart&amp;gt; )]] -- Breaks x into an integral and a fractional part&lt;br /&gt;
* [[Core Function Mod2PI|Mod2PI( &amp;lt;value&amp;gt; )]] -- Calculates the modulo 2*PI of the specified value&lt;br /&gt;
* [[Core Function MatlabMod|MatlabMod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the Matlab modulus operation&lt;br /&gt;
* [[Core Function OffsetCalc|OffsetCalc( &amp;lt;size&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Calculate the START and LENGTH of an array index&lt;br /&gt;
* [[Core Function Pow|Pow( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Returns a specified number raised to the specified power&lt;br /&gt;
* [[Core Function RadiansToDegrees|RadiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts radians to degrees&lt;br /&gt;
* [[Core Function RadiansToRevolutions|RadiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts radians to revolutions&lt;br /&gt;
* [[Core Function RadiansToGradians|RadiansToGradians( &amp;lt;value&amp;gt; )]] -- Converts radians to gradians&lt;br /&gt;
* [[Core Function Random|Random( &amp;lt;minValue&amp;gt;, &amp;lt;maxValue&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get a random number from the defined area&lt;br /&gt;
* [[Core Function RandomVar|RandomVar( &amp;lt;seed&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Generator a random number&lt;br /&gt;
* [[Core Function RandomSeed|RandomSeed( &amp;lt;flag&amp;gt;, &amp;lt;size&amp;gt; )]] -- Generator a cryptographically strong random number for use as a seed&lt;br /&gt;
* [[Core Function RandomSeedSet|RandomSeedSet( &amp;lt;seed&amp;gt; )]] -- Set the seed of Sputniks random number generator&lt;br /&gt;
* [[Core Function RevolutionsToDegrees|RevolutionsToDegrees( &amp;lt;value&amp;gt; )]] -- Converts revolutions to degrees.&lt;br /&gt;
* [[Core Function RevolutionsToRadians|RevolutionsToRadians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to radians.&lt;br /&gt;
* [[Core Function RevolutionsToGradians|RevolutionsToGradians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to gradians.&lt;br /&gt;
* [[Core Function Round|Round( &amp;lt;expression&amp;gt;, &amp;lt;decimalplaces&amp;gt; )]] -- Returns a number rounded to a specified number of decimal places&lt;br /&gt;
* [[Core Function RomToInt|RomToInt( &amp;lt;expression&amp;gt; )]] -- Returns the integer value of a roman numerical sequence&lt;br /&gt;
* [[Core Function Sin|Sin( &amp;lt;expression&amp;gt; )]] -- Returns the sine of the specified angle&lt;br /&gt;
* [[Core Function Sinh|Sinh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic sine of the specified angle&lt;br /&gt;
* [[Core Function SmoothStep|SmoothStep( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a cubic equation&lt;br /&gt;
* [[Core Function Sqrt|Sqrt( &amp;lt;expression&amp;gt; )]] -- Returns the square root of a specified number&lt;br /&gt;
* [[Core Function Sum|Sum( &amp;lt;expressions&amp;gt; )]] -- Returns the sum of all the parameters&lt;br /&gt;
* [[Core Function Tan|Tan( &amp;lt;expression&amp;gt; )]] -- Returns the tangent of the specified angle&lt;br /&gt;
* [[Core Function Tanh|Tanh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic tangent of the specified angle&lt;br /&gt;
* [[Core Function Truncate|Truncate( &amp;lt;expression&amp;gt; )]] -- Calculates the integral part of a specified decimal number&lt;br /&gt;
* [[Core Function WithinEpsilson|WithinEpsilson( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;epsilon&amp;gt; )]] -- Checks if value1 - value2 are almost equals within a float epsilon.&lt;br /&gt;
* [[Core Function Wrap|Wrap( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Wraps the specified value into a range&lt;br /&gt;
* [[Core Function WrapAngle|WrapAngle( &amp;lt;value&amp;gt; )]] -- Reduces a given angle to a value between π and -π.&lt;br /&gt;
* [[Core Function IsPrime|IsPrime( &amp;lt;expression&amp;gt; )]] -- Check if a number is a Prime number&lt;br /&gt;
&lt;br /&gt;
==== String Functions ====&lt;br /&gt;
* [[Core Function AddCSlashes|AddCSlashes( &amp;lt;str&amp;gt;, &amp;lt;charlist&amp;gt; )]] -- Escape a string with slashes in a C style&lt;br /&gt;
* [[Core Function AddBR|AddBR( &amp;lt;str&amp;gt; )]] -- Add HTML breaks to strings at newlines&lt;br /&gt;
* [[Core Function Asc|Asc( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function AscW|AscW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function AscArray|AscArray( &amp;lt;char&amp;gt; )]] -- Returns an array of ASCII characters of a string&lt;br /&gt;
* [[Core Function AscWArray|AscWArray( &amp;lt;char&amp;gt; )]] -- Returns an array of UNICODE characters of a string&lt;br /&gt;
* [[Core Function Between|Between( &amp;lt;haystack&amp;gt;, &amp;lt;firstneedle&amp;gt;, &amp;lt;secondneedle&amp;gt;, &amp;lt;case&amp;gt; )]] -- Return the text between a start and end substring&lt;br /&gt;
* [[Core Function BCrypt|BCrypt( &amp;lt;expression&amp;gt;, &amp;lt;rounds&amp;gt; )]] -- Hash a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function BCryptVerify|BCryptVerify( &amp;lt;expression&amp;gt;, &amp;lt;hash&amp;gt; )]] -- Verify a hash to a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function CSetMatch|CSetMatch( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Check if a string contains only characters from a substring(charset)&lt;br /&gt;
* [[Core Function CSetDel|CSetDel( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Delete all characters found in the charset from a string&lt;br /&gt;
* [[Core Function ChunkSplit|ChunkSplit( &amp;lt;body&amp;gt;, &amp;lt;chunklen&amp;gt;, &amp;lt;end&amp;gt; )]] -- Split a string into smaller chunks&lt;br /&gt;
* [[Core Function Chop|Chop( &amp;lt;variable&amp;gt; )]] -- Removes and returns the last character from a string&lt;br /&gt;
* [[Core Function Chomp|Chomp( &amp;lt;variable&amp;gt; )]] -- Removes trailing newlines and returns the number of characters removed&lt;br /&gt;
* [[Core Function CountChars|CountChars( &amp;lt;string&amp;gt; )]] -- Return information about characters used in a string&lt;br /&gt;
* [[Core Function CountWords|CountWords( &amp;lt;string&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;charlist&amp;gt;, &amp;lt;outputArray&amp;gt; )]] -- Return information about words used in a string&lt;br /&gt;
* [[Core Function Chr|Chr( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an ASCII code&lt;br /&gt;
* [[Core Function ChrW|ChrW( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an UNICODE code&lt;br /&gt;
* [[Core Function ChrArray|ChrArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array ASCII codes&lt;br /&gt;
* [[Core Function ChrWArray|ChrWArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array UNICODE codes&lt;br /&gt;
* [[Core Function CRC32|CRC32( &amp;lt;string&amp;gt; )]] -- Calculates the crc32 polynomial of a string&lt;br /&gt;
* [[Core Function Crypt|Crypt( &amp;lt;string&amp;gt;, &amp;lt;salt&amp;gt; )]] -- One-way string hashing&lt;br /&gt;
* [[Core Function Contains|Contains( &amp;lt;srting&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains a sub string&lt;br /&gt;
* [[Core Function ContainsAny|ContainsAny( &amp;lt;srting&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains any of the given strings from an array&lt;br /&gt;
* [[Core Function CountFields|CountFields( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns the number of values (fields) in the string passed that are separated by the separator string passed&lt;br /&gt;
* [[Core Function CSV|CSV( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Split strings and parse a CSV text into an array&lt;br /&gt;
* [[Core Function DecOct|DecOct( &amp;lt;expression&amp;gt; )]] -- Decimal to octal&lt;br /&gt;
* [[Core Function Dec|Dec( &amp;lt;expression&amp;gt; )]] -- Returns a integer representation of a hexadecimal string&lt;br /&gt;
* [[Core Function FDec|FDec( &amp;lt;expression&amp;gt; )]] -- Returns a float representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DDec|DDec( &amp;lt;expression&amp;gt; )]] -- Returns a double representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DecPad|DecPad( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pads numeric string to a given number of chars (Filling in the gap with zeros)&lt;br /&gt;
* [[Core Function DecryptString|DecryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Decrypt a string with a given password&lt;br /&gt;
* [[Core Function Decode64|Decode64( &amp;lt;expression&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Decodes string with MIME base64&lt;br /&gt;
* [[Core Function Encode64|Encode64( &amp;lt;expression&amp;gt; )]] -- Encodes string with MIME base64&lt;br /&gt;
* [[Core Function Escape|Escape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to a string&lt;br /&gt;
* [[Core Function EscapeMeta|EscapeMeta( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to meta characters&lt;br /&gt;
* [[Core Function EscapeShellArg|EscapeShellArg( &amp;lt;arg&amp;gt; )]] -- Escape a string to be used as a shell argument&lt;br /&gt;
* [[Core Function EscapeShellCmd|EscapeShellCmd( &amp;lt;command&amp;gt; )]] -- Escape shell metacharacters&lt;br /&gt;
* [[Core Function EncryptString|EncryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Encrypt a string with a given password&lt;br /&gt;
* [[Core Function EndsWith|EndsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string ends with a substring&lt;br /&gt;
* [[Core Function Hash|Hash( &amp;lt;expression&amp;gt; )]] -- Generate a unique hash code for a string value&lt;br /&gt;
* [[Core Function Hebrev|Hebrev( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text&lt;br /&gt;
* [[Core Function Hebrevc|Hebrevc( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text with newline conversion&lt;br /&gt;
* [[Core Function Hex2Str|Hex2Str( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a hex string back to a normal string&lt;br /&gt;
* [[Core Function Hex|Hex( &amp;lt;expression&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a string representation of an integer type converted to hexadecimal&lt;br /&gt;
* [[Core Function HTMLTranslationTable|HTMLTranslationTable( &amp;lt;the_table&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt; )]] -- Returns the translation table used by HTMLSpecialChars() and HTMLEntities()&lt;br /&gt;
* [[Core Function HTMLEntities|HTMLEntities( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all applicable characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLEntityDecode|HTMLEntityDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all HTML entities to their applicable characters&lt;br /&gt;
* [[Core Function HTMLSpecialChars|HTMLSpecialChars( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert special characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLSpecialCharsDecode|HTMLSpecialCharsDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Convert special HTML entities back to characters &lt;br /&gt;
* [[Core Function HTTPMakeQuery|HTTPMakeQuery( &amp;lt;array&amp;gt; )]] -- Converts an array into a properly formatted HTTP query string for use with requests etc&lt;br /&gt;
* [[Core Function HTTPParseQuery|HTTPParseQuery( &amp;lt;string&amp;gt; )]] -- Parse an HTTP query string into an array&lt;br /&gt;
* [[Core Function Fmt|Fmt( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a formatted string&lt;br /&gt;
* [[Core Function FmtNumber|FmtNumber( &amp;lt;number&amp;gt;, &amp;lt;decimals&amp;gt;, &amp;lt;dec_point&amp;gt;, &amp;lt;thousands_sep&amp;gt; )]] -- Format a number with grouped thousands&lt;br /&gt;
* [[Core Function FHex|FHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an float type converted to hexadecimal&lt;br /&gt;
* [[Core Function DHex|DHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an double type converted to hexadecimal&lt;br /&gt;
* [[Core Function Find|Find( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;plain&amp;gt; )]] -- Search for a match in a string and return the match with its found position and length&lt;br /&gt;
* [[Core Function GMatch|GMatch( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;asKeypair&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Extract the patterns from a string and return as array or associative array&lt;br /&gt;
* [[Core Function GSub|GSub( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;repl&amp;gt;, &amp;lt;max&amp;gt; )]] -- Returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function)&lt;br /&gt;
* [[Core Function InStr|InStr( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Checks if a string contains a given substring&lt;br /&gt;
* [[Core Function InStrRev|InStrRev( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Same as InStr() but searches from right to left instead of left to right&lt;br /&gt;
* [[Core Function isAlpha|isAlpha( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only Alphabetic characters&lt;br /&gt;
* [[Core Function isAlphaNumeric|isAlphaNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters&lt;br /&gt;
* [[Core Function isASCII|isASCII( &amp;lt;expression&amp;gt; )]] -- Check if string contains only ASCII chars&lt;br /&gt;
* [[Core Function isControl|isControl( &amp;lt;expression&amp;gt; )]] -- Check if string contains only control chars&lt;br /&gt;
* [[Core Function isEmpty|isEmpty( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty&lt;br /&gt;
* [[Core Function isEmptyOrNull|isEmptyOrNull( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty or if the variable is null or if the variable translates to false (zero)&lt;br /&gt;
* [[Core Function IsGraph|IsGraph( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely only characters that have a graphical representation&lt;br /&gt;
* [[Core Function isDigit|isDigit( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers&lt;br /&gt;
* [[Core Function isFloat|isFloat( &amp;lt;expression&amp;gt; )]] -- Check if string contains a floating point and could be converted&lt;br /&gt;
* [[Core Function isLower|isLower( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only lowercase letters&lt;br /&gt;
* [[Core Function isNumeric|isNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers (Allows for float/double)&lt;br /&gt;
* [[Core Function isSpace|isSpace( &amp;lt;expression&amp;gt; )]] -- Check if string contains only whitespace&lt;br /&gt;
* [[Core Function isSymbol|isSymbol( &amp;lt;expression&amp;gt; )]] -- Check if string contains only symbol chars&lt;br /&gt;
* [[Core Function IsPunctuation|IsPunctuation( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a punctuation marks&lt;br /&gt;
* [[Core Function IsSeparator|IsSeparator( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a separator character&lt;br /&gt;
* [[Core Function IsBlank|IsBlank( &amp;lt;expression&amp;gt; )]] -- Check if string contains only spaces and tabs&lt;br /&gt;
* [[Core Function isString|isString( &amp;lt;expression&amp;gt; )]] -- Check if variable contains only string chars&lt;br /&gt;
* [[Core Function isUpper|isUpper( &amp;lt;expression&amp;gt; )]] -- Check if string contains only uppercase chars&lt;br /&gt;
* [[Core Function isXDigit|isXDigit( &amp;lt;expression&amp;gt; )]] -- Check if string contains only hex chars&lt;br /&gt;
* [[Core Function IndexOf|IndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of the specified string in a string&lt;br /&gt;
* [[Core Function IndexOfAny|IndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function IndexNotOf|IndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function IndexNotOfAny|IndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexOf|LastIndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexOfAny|LastIndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexNotOf|LastIndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexNotOfAny|LastIndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function JsonEncode|JsonEncode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Returns the JSON representation of a value&lt;br /&gt;
* [[Core Function JsonDecode|JsonDecode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Decodes a JSON string&lt;br /&gt;
* [[Core Function Levenshtein|Levenshtein( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;cost_ins&amp;gt;, &amp;lt;cost_rep&amp;gt;, &amp;lt;cost_de&amp;gt; )]] -- Calculate Levenshtein distance between two strings&lt;br /&gt;
* [[Core Function LC|LC( &amp;lt;expression&amp;gt; )]] -- Returns string in all lower case&lt;br /&gt;
* [[Core Function LCFirst|LCFirst( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of string&lt;br /&gt;
* [[Core Function LCLast|LCLast( &amp;lt;expression&amp;gt; )]] -- Lower Cases last letter of string&lt;br /&gt;
* [[Core Function LCWords|LCWords( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of each word in string&lt;br /&gt;
* [[Core Function Left|Left( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the left-hand side of a string&lt;br /&gt;
* [[Core Function Lines|Lines( &amp;lt;expression&amp;gt; )]] -- Returns an array containing all the lines from a string&lt;br /&gt;
* [[Core Function Match|Match( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Search for the first match of pattern in a string if found return the captures from the pattern&lt;br /&gt;
* [[Core Function Metaphone|Metaphone( &amp;lt;string&amp;gt;, &amp;lt;phonemes&amp;gt; )]] -- Calculate the metaphone key of a string&lt;br /&gt;
* [[Core Function MD5|MD5( &amp;lt;expression&amp;gt; )]] -- Creates MD5 Hash of specified string&lt;br /&gt;
* [[Core Function NthField|NthField( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns a field from a row of data (such as comma separated text)&lt;br /&gt;
* [[Core Function Ord|Ord( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function OrdW|OrdW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function Oct|Oct( &amp;lt;string&amp;gt; )]] -- Converts an octal string into the numerical corresponding value&lt;br /&gt;
* [[Core Function PadLeft|PadLeft( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the left of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PadRight|PadRight( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the right of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PrintableEncode|PrintableEncode( &amp;lt;string )]] -- Convert a quoted-printable string to an 8 bit string&lt;br /&gt;
* [[Core Function PrintableDecode|PrintableDecode( &amp;lt;string )]] -- Convert a 8 bit string to a quoted-printable string&lt;br /&gt;
* [[Core Function RandStr|RandStr( &amp;lt;count&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Generate a random sequence of characters at a given length&lt;br /&gt;
* [[Core Function RegexMatch|RegexMatch( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;matches&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression match&lt;br /&gt;
* [[Core Function RegexReplace|RegexReplace( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;limit&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression search and replace&lt;br /&gt;
* [[Core Function RegexEscape|RegexEscape( &amp;lt;expression&amp;gt;, &amp;lt;delimiter&amp;gt; )]] -- Escape regular expression characters&lt;br /&gt;
* [[Core Function RegexUnescape|RegexUnescape( &amp;lt;expression&amp;gt; )]] -- Remove any escapes regular expression characters&lt;br /&gt;
* [[Core Function ResolveStr|ResolveStr( &amp;lt;expression&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Treat a given string as if it was a Sputnik &amp;quot;string&amp;quot; and parse all stuff inside it such as $variables etc&lt;br /&gt;
* [[Core Function Repeat|Repeat( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new string or new array containing repeats of a string provided&lt;br /&gt;
* [[Core Function Replace|Replace( &amp;lt;expression&amp;gt;, &amp;lt;find&amp;gt;, &amp;lt;replace&amp;gt;, &amp;lt;case-sensitive-flag&amp;gt; )]] -- Replace substrings within a string with other strings&lt;br /&gt;
* [[Core Function Reverse|Reverse( &amp;lt;expression&amp;gt; )]] -- Reverse all characters in a string&lt;br /&gt;
* [[Core Function RevHex|RevHex( &amp;lt;expression&amp;gt; )]] -- Reverse a string of hex digits&lt;br /&gt;
* [[Core Function Right|Right( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the right-hand side of a string&lt;br /&gt;
* [[Core Function Rot13|Rot13( &amp;lt;str&amp;gt; )]] -- Perform the rot13 transform on a string&lt;br /&gt;
* [[Core Function Scanf|Scanf( &amp;lt;expression&amp;gt;, &amp;lt;def&amp;gt; )]] -- Parses input from a string according to a format&lt;br /&gt;
* [[Core Function SHA1|SHA1( &amp;lt;expression&amp;gt; )]] -- Returns SHA1 hash of string&lt;br /&gt;
* [[Core Function Serialize|Serialize( &amp;lt;variable&amp;gt; )]] -- Convert a variable, array, class etc a string you can save to file or transfer over the internet&lt;br /&gt;
* [[Core Function SimilarText|SimilarText( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;percent&amp;gt; )]] -- Calculates the similarity between two input strings and return a percentage of the matching between the two input strings&lt;br /&gt;
* [[Core Function Split|Split( &amp;lt;expression&amp;gt;, &amp;lt;delim/pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Splits up a string into substrings depending on the given delimiters.&lt;br /&gt;
* [[Core Function SPrintf|SPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function)&lt;br /&gt;
* [[Core Function StartsWith|StartsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string starts with a substring&lt;br /&gt;
* [[Core Function StrChr|StrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate first occurrence of character in string&lt;br /&gt;
* [[Core Function StrrChr|StrrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate last occurrence of character in string&lt;br /&gt;
* [[Core Function StrShuffle|StrShuffle( &amp;lt;str&amp;gt; )]] --  Randomly shuffles a string&lt;br /&gt;
* [[Core Function Strpbrk|Strpbrk( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate a list of possible characters in string and return the position of it&lt;br /&gt;
* [[Core Function StripCSlashes|StripCSlashes( &amp;lt;str&amp;gt; )]] -- Unescape string escaped with AddCSlashes()&lt;br /&gt;
* [[Core Function StripTags|StripTags( &amp;lt;str&amp;gt;, &amp;lt;allowable_tags&amp;gt; )]] -- Strip HTML tags from a string&lt;br /&gt;
* [[Core Function StripWS|StripWS( &amp;lt;str&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;charList&amp;gt; )]] -- Strips the white space in a string or given characters.&lt;br /&gt;
* [[Core Function StrSpn|StrSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask&lt;br /&gt;
* [[Core Function StrCSpn|StrCSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Find length of initial segment not matching mask&lt;br /&gt;
* [[Core Function StrCmp|StrCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- String comparison&lt;br /&gt;
* [[Core Function StrNatCmp|StrNatCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparisons using a &amp;quot;natural order&amp;quot; algorithm&lt;br /&gt;
* [[Core Function StrVersCmp|StrVersCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparison holding name and indices/version numbers&lt;br /&gt;
* [[Core Function Soundex|Soundex( &amp;lt;str&amp;gt; )]] -- Calculate the soundex key of a string&lt;br /&gt;
* [[Core Function Str2Hex|Str2Hex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to a hex string&lt;br /&gt;
* [[Core Function StrNew|StrNew( &amp;lt;char&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; ]] -- Create a new string of a given length filled with a given char&lt;br /&gt;
* [[Core Function StrInsert|StrInsert( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Insert a string at a given index of another string and return the new string&lt;br /&gt;
* [[Core Function StrIndex|StrIndex( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get or set a char from/to a string at a specific index&lt;br /&gt;
* [[Core Function StrIncrement|StrIncrement( &amp;lt;str&amp;gt; )]] -- Increment a string the same way as doing ++ on a string like $a++&lt;br /&gt;
* [[Core Function StrPos|StrPos( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the position of the first/last occurrence of a substring in a string&lt;br /&gt;
* [[Core Function StrTr|StrTr( &amp;lt;str&amp;gt;, &amp;lt;from-to/replace_pairs&amp;gt; )]] -- Translate characters or replace substrings&lt;br /&gt;
* [[Core Function StrTok|StrTok( &amp;lt;str/token&amp;gt;, &amp;lt;token&amp;gt; )]] -- Tokenize string&lt;br /&gt;
* [[Core Function StrStr|StrStr( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;before_needle&amp;gt;, &amp;lt;find_last&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first/last occurrence of a string&lt;br /&gt;
* [[Core Function StrLen|StrLen( &amp;lt;expression&amp;gt; )]] -- Returns length of specified string&lt;br /&gt;
* [[Core Function SubStr|SubStr( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function SubStrCount|SubStrCount( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Count the number of substring occurrences&lt;br /&gt;
* [[Core Function SubStrCmp|SubStrCmp( &amp;lt;main_str&amp;gt;, &amp;lt;str&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Comparison of two strings from an offset, up to length characters&lt;br /&gt;
* [[Core Function SubStrReplace|SubStrReplace( &amp;lt;expression&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace text within a portion of a string&lt;br /&gt;
* [[Core Function Sub|Sub( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function StrSplit|StrSplit( &amp;lt;expression&amp;gt;, &amp;lt;split_length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to an array&lt;br /&gt;
* [[Core Function StrCompress|StrCompress( &amp;lt;expression&amp;gt; )]] -- Compress a string&lt;br /&gt;
* [[Core Function StrUncompress|StrUncompress( &amp;lt;expression&amp;gt; )]] -- Uncompress a string&lt;br /&gt;
* [[Core Function Trim|Trim( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Removes whitespace from the beginning and end of a string&lt;br /&gt;
* [[Core Function TrimLeft|TrimLeft( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the start of a string&lt;br /&gt;
* [[Core Function TrimRight|TrimRight( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the end of a string&lt;br /&gt;
* [[Core Function TrimToNull|TrimToNull( &amp;lt;string&amp;gt; )]] -- Strip all zero chars (nulls) from the end of a string&lt;br /&gt;
* [[Core Function UC|UC( &amp;lt;expression&amp;gt; )]] -- Returns string in all Upper Case&lt;br /&gt;
* [[Core Function UCFirst|UCFirst( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of string&lt;br /&gt;
* [[Core Function UCLast|UCLast( &amp;lt;expression&amp;gt; )]] -- Upper Cases last letter of string&lt;br /&gt;
* [[Core Function UCWords|UCWords( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of each word in string&lt;br /&gt;
* [[Core Function UUEncode|UUEncode( &amp;lt;expression&amp;gt; )]] -- Encodes a string using the uuencode algorithm&lt;br /&gt;
* [[Core Function UUDecode|UUDecode( &amp;lt;expression&amp;gt; )]] -- Decodes a string that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function Unescape|Unescape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Remove all escapes from a string&lt;br /&gt;
* [[Core Function Unserialize|Unserialize( &amp;lt;string&amp;gt; )]] -- Convert a string (Created with Serialize()) into its original variable/class/array etc&lt;br /&gt;
* [[Core Function UrlEncodeBytes|UrlEncodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Cnvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function UrlDecodeBytes|UrlDecodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Convert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function VSPrintf|VSPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function) but accepts arrays as the arguments&lt;br /&gt;
* [[Core Function WordWrap|WordWrap( &amp;lt;str&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;break&amp;gt;, &amp;lt;cut&amp;gt; )]] -- Wraps a string to a given number of characters&lt;br /&gt;
&lt;br /&gt;
==== Array Functions ====&lt;br /&gt;
* [[Core Function SameValues|SameValues( &amp;lt;array&amp;gt; )]] -- Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* [[Core Function ArrayScope|ArrayScope( &amp;lt;array&amp;gt;, &amp;lt;scope&amp;gt; )]] -- Get or Set an arrays internal Sputnik scope (Only to be used by Sputnik library developers)&lt;br /&gt;
* [[Core Function IsHash|IsHash( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Strings rather than numeric (Making it a full hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsHashAny|IsHashAny( &amp;lt;array&amp;gt; )]] -- Check if any of the keys in an array are Strings rather than numeric (Making it a possible hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsArray|IsArray( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Numeric and none are String (Making it a full array rather than full hashmap or mixed)&lt;br /&gt;
* [[Core Function IsList|IsList( &amp;lt;array&amp;gt; )]] -- Same as IsArray but also checks to make sure the keys start at 0 and end at the highest with no gaps which makes it a perfect list&lt;br /&gt;
* [[Core Function Array|Array( &amp;lt;expressions&amp;gt; )]] -- Create a new array&lt;br /&gt;
* [[Core Function Clear|Clear( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Remove all items from an array&lt;br /&gt;
* [[Core Function Join|Join( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array into a string with an optional separator&lt;br /&gt;
* [[Core Function JoinKV|JoinKV( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array (as keys and values) into a string with an optional separator&lt;br /&gt;
* [[Core Function Count|Count( &amp;lt;array/binary-array/class&amp;gt; )]] -- Returns the size of array (How many elements it currently has stored)&lt;br /&gt;
* [[Core Function Fill|Fill( &amp;lt;start&amp;gt;, &amp;lt;num&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values&lt;br /&gt;
* [[Core Function FillKeys|FillKeys( &amp;lt;keys&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values, specifying keys&lt;br /&gt;
* [[Core Function UBound|UBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the highest element in an array&lt;br /&gt;
* [[Core Function LBound|LBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the lowest element in an array&lt;br /&gt;
* [[Core Function Push|Push( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the end of an array&lt;br /&gt;
* [[Core Function PushArray|PushArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the end of an array&lt;br /&gt;
* [[Core Function Insert|Insert( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to an array at a given location&lt;br /&gt;
* [[Core Function InsertArray|InsertArray( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;arrays&amp;gt; )]] -- Add arrays to an array at a given location&lt;br /&gt;
* [[Core Function Pad|Pad( &amp;lt;array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pad array to the specified length with a value&lt;br /&gt;
* [[Core Function Unshift|Unshift( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the beginning of an array&lt;br /&gt;
* [[Core Function UnshiftArray|UnshiftArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the beginning of an array&lt;br /&gt;
* [[Core Function Pop|Pop( &amp;lt;array&amp;gt; )]] -- Delete the last item in an array&lt;br /&gt;
* [[Core Function Shift|Shift( &amp;lt;array&amp;gt; )]] -- Delete the first item in an array&lt;br /&gt;
* [[Core Function Range|Range( &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;step&amp;gt; )]] -- Create an array containing a range of elements&lt;br /&gt;
* [[Core Function Remove|Remove( &amp;lt;array&amp;gt;, &amp;lt;start-id&amp;gt;, &amp;lt;end-id&amp;gt; )]] -- Delete items from an array starting at a given location and stopping at a given location&lt;br /&gt;
* [[Core Function RemoveValue|RemoveValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific value or all matching values from an array&lt;br /&gt;
* [[Core Function RemoveValues|RemoveValues( &amp;lt;array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of specific values from an array&lt;br /&gt;
* [[Core Function RemoveKey|RemoveKey( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific key from an array&lt;br /&gt;
* [[Core Function RemoveKeys|RemoveKeys( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of keys from an recursively from an array&lt;br /&gt;
* [[Core Function IsIndexSet|IsIndexSet( &amp;lt;array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an element exist at a given index ID within an array&lt;br /&gt;
* [[Core Function Grep|Grep( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays values that match the given regex pattern&lt;br /&gt;
* [[Core Function GrepKeys|GrepKeys( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays keys that match the given regex pattern&lt;br /&gt;
* [[Core Function Search|Search( &amp;lt;array&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;invert_flag&amp;gt;, &amp;lt;returnKeys&amp;gt; )]] -- Returns a new array consisting of the elements of the input array that match the given value&lt;br /&gt;
* [[Core Function Combine|Combine( &amp;lt;array-keys&amp;gt;, &amp;lt;array-values&amp;gt; )]] -- Creates a hash (Dictionary) by using the values from the keys array as keys and the values from the values array as the corresponding values&lt;br /&gt;
* [[Core Function Walk|Walk( &amp;lt;array&amp;gt;, &amp;lt;function&amp;gt; )]] -- Walk through the arrays items and execute a user defined function on each one&lt;br /&gt;
* [[Core Function Rev|Rev( &amp;lt;array&amp;gt; )]] -- Returns a new array consisting of the reverse of another array&lt;br /&gt;
* [[Core Function IsKeySet|IsKeySet( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt; )]] -- Check if given key exists within an array&lt;br /&gt;
* [[Core Function IsKeysSet|IsKeysSet( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if any/all/none of a given key from a key array was found inside an array&lt;br /&gt;
* [[Core Function Keys|Keys( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all KEYS from an array&lt;br /&gt;
* [[Core Function Values|Values( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all VALUES from an array&lt;br /&gt;
* [[Core Function InArray|InArray( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Checks if a value exists in an array&lt;br /&gt;
* [[Core Function Flip|Flip( &amp;lt;array&amp;gt; )]] -- Exchanges all keys with their associated values in an array&lt;br /&gt;
* [[Core Function Splice|Splice( &amp;lt;array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;replace_with&amp;gt; )]] -- Cut out and return a chunk or portion of an array and optionally replace the cut out section with new data.&lt;br /&gt;
* [[Core Function Order|Order( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Fix the order of numeric array elements from 0 to whatever.&lt;br /&gt;
* [[Core Function Sort|Sort( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Sort an array by value or keys optionally modify it in place or return new and optionally use a custom function to decide how to sort it&lt;br /&gt;
* [[Core Function CountValues|CountValues( &amp;lt;array&amp;gt; )]] -- Counts all the values of an array&lt;br /&gt;
* [[Core Function SumKeys|SumKeys( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the keys of an array&lt;br /&gt;
* [[Core Function SumValues|SumValues( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the values of an array&lt;br /&gt;
* [[Core Function IndexOfValue|IndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexOfValueAny|IndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array) exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexNotOfValue|IndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the first index that does not contain the value&lt;br /&gt;
* [[Core Function IndexNotOfValueAny|IndexNotOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value (from an array) in an array and returns the first index that does not contain any of the values&lt;br /&gt;
* [[Core Function LastIndexOfValue|LastIndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns the index of the last occurrence of the value&lt;br /&gt;
* [[Core Function LastIndexOfValueAny|LastIndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array of values) exists in an array and returns the index of the last occurrence of the value (from the value array)&lt;br /&gt;
* [[Core Function LastIndexNotOfValue|LastIndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the last index that does not contain the value&lt;br /&gt;
&lt;br /&gt;
==== Linq (Integrated Language Query) Functions ====&lt;br /&gt;
These functions are basically quick ways to shuffle arrays around (sort and organize them etc) and are BEST suited for when the array contains nothing but Classes but you can use them on any array if you want.&lt;br /&gt;
* [[Core Function All|All( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of all elements in the query are a true match&lt;br /&gt;
* [[Core Function Any|Any( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of any of the elements in the query are a true match&lt;br /&gt;
* [[Core Function Concat|Concat( &amp;lt;array&amp;gt;, &amp;lt;array&amp;gt;... )]] -- Join multiple arrays (query results?) together&lt;br /&gt;
* [[Core Function First|First( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the first matching element from the query&lt;br /&gt;
* [[Core Function FirstOrDefault|FirstOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the first matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Last|Last( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the last matching element from the query&lt;br /&gt;
* [[Core Function LastOrDefault|LastOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the last matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Where|Where( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and returns all matching&lt;br /&gt;
* [[Core Function WhereNot|WhereNot( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and all non matching&lt;br /&gt;
* [[Core Function SumInt|SumInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as an Int64&lt;br /&gt;
* [[Core Function SumUInt|SumUInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a UInt64&lt;br /&gt;
* [[Core Function SumDouble|SumDouble( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a Double&lt;br /&gt;
* [[Core Function Obtain|Obtain( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Gathers up all matching elements from the query and returns them (Unlike Where() this returns the values directly instead of their source so instead of returning the class it will return the variable)&lt;br /&gt;
&lt;br /&gt;
==== Enum Functions ====&lt;br /&gt;
* [[Core Function Enumerate|Enumerate( &amp;lt;enum&amp;gt; )]] -- Cycle through all Name + Values in an enum&lt;br /&gt;
* [[Core Function EnumKey|EnumKey( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the string KEY for a given integer value&lt;br /&gt;
* [[Core Function EnumValue|EnumValue( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the integer value for a given string KEY&lt;br /&gt;
* [[Core Function EnumAdd|EnumAdd( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add a new key and value to an existing enum&lt;br /&gt;
* [[Core Function EnumDel|EnumDel( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt; )]] -- Delete a key and value from an existing enum&lt;br /&gt;
* [[Core Function EnumIsDefined|EnumIsDefined( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a given value exists within an enum&lt;br /&gt;
&lt;br /&gt;
==== Process Functions ====&lt;br /&gt;
* [[Core Function DLLCall|DLLCall( &amp;lt;Dll/DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt;, &amp;lt;Parms&amp;gt; )]] -- Dynamically call a function in a DLL&lt;br /&gt;
* [[Core Function DLLOpen|DLLOpen( &amp;lt;DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt; )]] -- Open a DLL and get a function from it and return it as a ready to call object function that is already compiled (vastly speeding up the repeat call speed)&lt;br /&gt;
* [[Core Function DLLClose|DLLClose( &amp;lt;DLL&amp;gt; )]] -- Close and unset a return value from DLLOpen()&lt;br /&gt;
* [[Core Function DLLImport|DLLImport( &amp;lt;varies...&amp;gt; )]] -- Dynamically load a function from a DLL and transform it to act and behave like a normal Sputnik function (Can load thousands functions at a time and even save the loaded stuff to DLL for quick access later)&lt;br /&gt;
* [[Core Function Exec|Exec( &amp;lt;command&amp;gt;, &amp;lt;output&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program&lt;br /&gt;
* [[Core Function ExecShell|ExecShell( &amp;lt;command&amp;gt; )]] -- Execute command via shell and return the complete output as a string&lt;br /&gt;
* [[Core Function ExecSystem|ExecSystem( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display the output&lt;br /&gt;
* [[Core Function Passthru|Passthru( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display raw output&lt;br /&gt;
* [[Core Function System|System( &amp;lt;expression&amp;gt; )]] -- Execute system command&lt;br /&gt;
* [[Core Function Run|Run( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program&lt;br /&gt;
* [[Core Function RunWait|RunWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program and waits until the program finishes&lt;br /&gt;
* [[Core Function RunShell|RunShell( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute)&lt;br /&gt;
* [[Core Function RunShellWait|RunShellWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute) and waits until the program finishes&lt;br /&gt;
* [[Core Function RunAsSet|RunAsSet( &amp;lt;user&amp;gt;, &amp;lt;domain&amp;gt;, &amp;lt;password&amp;gt;, &amp;lt;options&amp;gt; )]] -- Initialise a set of user credentials to use during Run and RunWait operations.&lt;br /&gt;
* [[Core Function RunCapture|RunCapture( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Run a program in a hidden window and capture its printed output as strings&lt;br /&gt;
* [[Core Function PHandle|PHandle( )]] -- Get the process handle of this program&lt;br /&gt;
* [[Core Function ProcessClose|ProcessClose( &amp;lt;pid/name&amp;gt; )]] -- Terminates a named process&lt;br /&gt;
* [[Core Function ProcessID|ProcessID( &amp;lt;name&amp;gt; )]] -- Gets the process ID of a given name&lt;br /&gt;
* [[Core Function ProcessExists|ProcessExists( &amp;lt;pid/name&amp;gt; )]] -- Checks to see if a specified process exists&lt;br /&gt;
* [[Core Function ProcessList|ProcessList( &amp;lt;name&amp;gt; )]] -- Returns an array listing the currently running processes (names and PIDs)&lt;br /&gt;
* [[Core Function ProcessSetPriority|ProcessSetPriority( &amp;lt;pid/name&amp;gt;, &amp;lt;priority&amp;gt; )]] -- Changes the priority of a process&lt;br /&gt;
* [[Core Function ProcessWait|ProcessWait( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process exists or optional the timeout expires&lt;br /&gt;
* [[Core Function ProcessWaitClose|ProcessWaitClose( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process no longer exists or optional the timeout expires&lt;br /&gt;
* [[Core Function Shutdown|Shutdown( &amp;lt;shutdown code&amp;gt; )]] -- Shuts down the system&lt;br /&gt;
* [[Core Function Debug|Debug( &amp;lt;flag&amp;gt; )]] -- Enter or leave debug mode in debug state the program can interact with operating system processes that run in a special mode by enabling the native property SeDebugPrivilege on the current thread&lt;br /&gt;
&lt;br /&gt;
==== Environment Management ====&lt;br /&gt;
* [[Core Function EnvExpand|EnvExpand( &amp;lt;expression&amp;gt; )]] -- Convert a string containing %name% env tags and return complete string with names resolved&lt;br /&gt;
* [[Core Function EnvGet|EnvGet( &amp;lt;tag&amp;gt; )]] -- Get the value of an environment variable&lt;br /&gt;
* [[Core Function EnvSet|EnvSet( &amp;lt;tag&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set the value of an environment variable&lt;br /&gt;
* [[Core Function EnvUpdate|EnvUpdate( )]] -- Refreshes the OS environment&lt;br /&gt;
&lt;br /&gt;
==== File Functions ====&lt;br /&gt;
&lt;br /&gt;
===== File Create/Read/Write Functions =====&lt;br /&gt;
* [[Core Function FileOpen|FileOpen( &amp;lt;FileName&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Opens a file for reading or writing&lt;br /&gt;
* [[Core Function FileOpenText|FileOpenText( &amp;lt;FileName&amp;gt; )]] -- Opens a file for reading only (text files only)&lt;br /&gt;
* [[Core Function FileClose|FileClose( &amp;lt;file&amp;gt; )]] -- Closes a previously opened file&lt;br /&gt;
* [[Core Function FileWrite|FileWrite( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write text to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteBinary|FileWriteBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Write the data from a binary variable to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteLines|FileWriteLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write an array of lines to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileAppend|FileAppend( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append a line of text to the end of a previously opened text file&lt;br /&gt;
* [[Core Function FileAppendBinary|FileAppendBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Append the data from a binary variable to the end of a previously opened file&lt;br /&gt;
* [[Core Function FileAppendLines|FileAppendLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append an array of lines to the end of previously opened file&lt;br /&gt;
* [[Core Function FileSeek|FileSeek( &amp;lt;file&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Change the POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FilePos|FilePos( &amp;lt;file&amp;gt; )]] -- Get the current POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FileRead|FileRead( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a text file starting from current File Steam pointer location and return them as a string&lt;br /&gt;
* [[Core Function FileReadBinary|FileReadBinary( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a file starting from current File Steam pointer location&lt;br /&gt;
* [[Core Function FileReadLine|FileReadLine( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a line of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadLines|FileReadLines( &amp;lt;file&amp;gt; )]] -- Read all lines of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadText|FileReadText( &amp;lt;file&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;length&amp;gt; )]] -- Read text from a file opened by FileOpenText() using the format and length params&lt;br /&gt;
* [[Core Function FileTemp|FileTemp(  )]] -- Create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* [[Core Function FileSave|FileSave( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Save all text to a file&lt;br /&gt;
* [[Core Function FileLoad|FileLoad( &amp;lt;file&amp;gt; )]] -- Load all text from a file&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function FileMove|FileMove( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Move a file&lt;br /&gt;
* [[Core Function FileCopy|FileCopy( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Copy a file&lt;br /&gt;
* [[Core Function FileDelete|FileDelete( &amp;lt;file&amp;gt; )]] -- Delete a file&lt;br /&gt;
* [[Core Function FileExists|FileExists( &amp;lt;file&amp;gt; )]] -- Check if a given file exists&lt;br /&gt;
* [[Core Function FileCreationTime|FileCreationTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the creation time of a file&lt;br /&gt;
* [[Core Function FileWriteTime|FileWriteTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last write time of a file&lt;br /&gt;
* [[Core Function FileAccessTime|FileAccessTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last access time of a file&lt;br /&gt;
* [[Core Function FileEncrypt|FileEncrypt( &amp;lt;file&amp;gt; )]] -- Encrypt a file so only the windows account used to encrypt it can decrypt it&lt;br /&gt;
* [[Core Function FileDecrypt|FileDecrypt( &amp;lt;file&amp;gt; )]] -- Decrypt a file previously encrypted by this windows user account&lt;br /&gt;
* [[Core Function FileMD5|FileMD5( &amp;lt;file&amp;gt; )]] -- Calculate the MD5 checksum of a file&lt;br /&gt;
* [[Core Function FileSHA1|FileSHA1( &amp;lt;file&amp;gt; )]] -- Calculate the SHA1 checksum of a file&lt;br /&gt;
* [[Core Function FileSize|FileSize( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns the file size in bytes (or return the formatted size)&lt;br /&gt;
* [[Core Function FileIsText|FileIsText( &amp;lt;file&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns true if the file contains only text&lt;br /&gt;
* [[Core Function FileRecycleEmpty|FileRecycleEmpty( &amp;lt;root&amp;gt; )]] -- Empty the recycle bin with no GUI, sound or confirmation&lt;br /&gt;
* [[Core Function FileRecycle|FileRecycle( &amp;lt;filename&amp;gt; )]] -- Move a file or directory to the recycle bin&lt;br /&gt;
* [[Core Function FileMatch|FileMatch( &amp;lt;pattern&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Match filename against a Glob pattern&lt;br /&gt;
&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FileSaveDialog|FileSaveDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Save File Dialog&lt;br /&gt;
* [[Core Function FileOpenDialog|FileOpenDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Load File Dialog&lt;br /&gt;
&lt;br /&gt;
==== Directory Functions ====&lt;br /&gt;
* [[Core Function GetFiles|GetFiles ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all files in a directory&lt;br /&gt;
* [[Core Function GetFolders|GetFolders ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all folders in a directory&lt;br /&gt;
* [[Core Function Glob|Glob( &amp;lt;pattern&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Find files/folders matching a pattern&lt;br /&gt;
* [[Core Function MKDir|MKDir ( &amp;lt;path&amp;gt; )]] -- Creates all directories and subdirectories as specified by path&lt;br /&gt;
* [[Core Function RMDir|RMDir ( &amp;lt;path&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Deletes the specified directory and, if indicated, any subdirectories in the directory&lt;br /&gt;
* [[Core Function DirExists|DirExists ( &amp;lt;path&amp;gt; )]] -- Determines whether the given path refers to an existing directory on disk&lt;br /&gt;
* [[Core Function DirCopy|DirCopy ( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Copies a directory and all sub-directories and files (Similar to xcopy)&lt;br /&gt;
* [[Core Function DirMove|DirMove( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Moves a directory to another location&lt;br /&gt;
* [[Core Function DirSize|DirSize( &amp;lt;path&amp;gt; )]] -- Returns the size in bytes of a whole directory&lt;br /&gt;
* [[Core Function CurDir|CurDir ( &amp;lt;path&amp;gt; )]] -- Get or Set the current working directory&lt;br /&gt;
* [[Core Function CombinePath|CombinePath( &amp;lt;path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Safe way to combine two paths into one&lt;br /&gt;
* [[Core Function GetRelativePath|GetRelativePath( &amp;lt;Path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Try makes a path relative to another&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FolderSelectDialog|FolderSelectDialog ( &amp;lt;text&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;init dir&amp;gt; )]] -- Initiates a Browse For Folder Dialog&lt;br /&gt;
&lt;br /&gt;
==== Path Functions ====&lt;br /&gt;
* [[Core Function ParsePath|ParsePath ( &amp;lt;path&amp;gt; )]] -- Resolve a file name and locate its full path&lt;br /&gt;
* [[Core Function HasExtension|HasExtension ( &amp;lt;path&amp;gt; )]] -- Determines whether a path includes a file name extension&lt;br /&gt;
* [[Core Function GetFullPath|GetFullPath ( &amp;lt;path&amp;gt; )]] -- Returns the absolute path for the specified path string&lt;br /&gt;
* [[Core Function GetDirectoryName|GetDirectoryName ( &amp;lt;path&amp;gt; )]] -- Returns the directory information for the specified path string&lt;br /&gt;
* [[Core Function GetExtension|GetExtension ( &amp;lt;path&amp;gt; )]] -- Returns the extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileName|GetFileName ( &amp;lt;path&amp;gt; )]] -- Returns the file name and extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileNameWithoutExtension|GetFileNameWithoutExtension ( &amp;lt;path&amp;gt; )]] -- Returns the file name of the specified path string without the extension&lt;br /&gt;
* [[Core Function GetPathRoot|GetPathRoot ( &amp;lt;path&amp;gt; )]] -- Gets the root directory information of the specified path&lt;br /&gt;
* [[Core Function IsPathRooted|IsPathRooted ( &amp;lt;path&amp;gt; )]] -- Gets a value indicating whether the specified path string contains absolute or relative path information&lt;br /&gt;
* [[Core Function GetDosPath|GetDosPath( &amp;lt;path&amp;gt; )]] -- Returns a given path in DOS friendly style (shortened)&lt;br /&gt;
* [[Core Function AddPath|AddPath( &amp;lt;path&amp;gt; )]] -- Add a directory to the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
* [[Core Function DelPath|DelPath( &amp;lt;path&amp;gt; )]] -- Remove a directory from the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
&lt;br /&gt;
==== Network Functions ====&lt;br /&gt;
&lt;br /&gt;
===== HTTP Functions =====&lt;br /&gt;
* [[Core Function HTTPFileExists|HTTPFileExists( &amp;lt;url&amp;gt; )]] -- Check if a file exists at a given URL&lt;br /&gt;
* [[Core Function HTTPGetString|HTTPGetString( &amp;lt;url&amp;gt; )]] -- Copy all text from a URL and return it as a string&lt;br /&gt;
* [[Core Function HTTPDownload|HTTPDownload( &amp;lt;url&amp;gt;, &amp;lt;dest&amp;gt;, &amp;lt;progress&amp;gt;, &amp;lt;completed&amp;gt;, &amp;lt;param&amp;gt; )]] -- Download a file from a given URL&lt;br /&gt;
&lt;br /&gt;
===== MySQL Functions =====&lt;br /&gt;
* [[Core Function MySQLConnect|MySQLConnect( &amp;lt;ip/ip:port&amp;gt;, &amp;lt;login&amp;gt;, &amp;lt;password&amp;gt; )]] -- Connect to a MySQL database&lt;br /&gt;
* [[Core Function MySQLSelectDB|MySQLSelectDB( &amp;lt;mysql&amp;gt;, &amp;lt;db name&amp;gt; )]] -- Select a database&lt;br /&gt;
* [[Core Function MySQLQuery|MySQLQuery( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Execute a query&lt;br /&gt;
* [[Core Function MySQLFill|MySQLFill( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Grab a table or parts of it from the Database&lt;br /&gt;
* [[Core Function MySQLFetch|MySQLFetch( &amp;lt;mysql data&amp;gt; )]] -- Fetch the next row from a table&lt;br /&gt;
* [[Core Function MySQLFetchReset|MySQLFetchReset( &amp;lt;mysql data&amp;gt; )]] -- Reset the current position in the table rows to 0&lt;br /&gt;
* [[Core Function MySQLFields|MySQLFields( &amp;lt;mysql data&amp;gt; )]] -- Return how many Fields are in the table&lt;br /&gt;
* [[Core Function MySQLRows|MySQLRows( &amp;lt;mysql data&amp;gt; )]] -- Return how many Rows are in the table&lt;br /&gt;
* [[Core Function MySQLClose|MySQLClose( &amp;lt;mysql&amp;gt; )]] -- Close a MySQL connection&lt;br /&gt;
&lt;br /&gt;
===== Sputnik Client/Server Functions (This is just for connecting Sputnik Clients to Sputnik Servers nothing else) =====&lt;br /&gt;
* [[Core Function SSListen|SSListen( &amp;lt;port&amp;gt;, &amp;lt;max connections&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Create a server and begin listening for clients to connect&lt;br /&gt;
* [[Core Function SSConnect|SSConnect( &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;connection string&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Connect to a server&lt;br /&gt;
* [[Core Function SSApprove|SSApprove( &amp;lt;client socket&amp;gt; )]] -- Approve a client to connect to the server&lt;br /&gt;
* [[Core Function SSDisapprove|SSDisapprove( &amp;lt;client socket&amp;gt; )]] -- Disapprove a client to connect to the server&lt;br /&gt;
* [[Core Function SSClientStatus|SSClientStatus( &amp;lt;client/client socket&amp;gt; )]] -- Get the status of a client or of our client&lt;br /&gt;
* [[Core Function SSClientIP|SSClientIP( &amp;lt;client socket&amp;gt; )]] -- Get the IP of a client socket&lt;br /&gt;
* [[Core Function SSRecv|SSRecv( &amp;lt;server/client&amp;gt; )]] -- Check for a message recieved from client/server&lt;br /&gt;
* [[Core Function SSRead|SSRead( &amp;lt;client/server&amp;gt;, &amp;lt;data type&amp;gt; )]] --Read data from a client/server&lt;br /&gt;
* [[Core Function SSDrop|SSDrop( &amp;lt;client socket&amp;gt;, &amp;lt;reason&amp;gt; )]] -- Kick a client off the server&lt;br /&gt;
* [[Core Function SSSend|SSSend( /* depends... /* )]] -- Send data to client or server&lt;br /&gt;
* [[Core Function SSBufferNew|SSBufferNew( &amp;lt;nothing/server/client&amp;gt; )]] -- Create a new net buffer to store data to send to the client/server&lt;br /&gt;
* [[Core Function SSBufferPut|SSBufferPut( &amp;lt;netBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Add data to a net buffer&lt;br /&gt;
&lt;br /&gt;
===== Raw Sockets (TCP/UDP etc) =====&lt;br /&gt;
* [[Core Function SocketAccept|SocketAccept( &amp;lt;socket&amp;gt;  )]] -- Creates a new &amp;lt;socket&amp;gt; for a newly created connection&lt;br /&gt;
* [[Core Function SocketAvailable|SocketAvailable( &amp;lt;socket&amp;gt;  )]] -- Gets the amount of data that has been received from the network and is available to be read&lt;br /&gt;
* [[Core Function SocketBind|SocketBind( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Associates a &amp;lt;socket&amp;gt; with a local endpoint&lt;br /&gt;
* [[Core Function SocketClose|SocketClose( &amp;lt;socket&amp;gt;, &amp;lt;wait&amp;gt;  )]] -- Closes the &amp;lt;socket&amp;gt; connection and releases all associated resources&lt;br /&gt;
* [[Core Function SocketConnect|SocketConnect( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Establishes a connection to a remote host&lt;br /&gt;
* [[Core Function SocketConnected|SocketConnected( &amp;lt;socket&amp;gt; )]] -- Checks if a socket is connected and ready for use or not&lt;br /&gt;
* [[Core Function SocketCreate|SocketCreate( &amp;lt;sockettype&amp;gt;, &amp;lt;protocoltype&amp;gt;, &amp;lt;addressfamily&amp;gt; )]] -- Create a new &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketListen|SocketListen( &amp;lt;socket&amp;gt;, &amp;lt;backlog&amp;gt;  )]] -- Places a &amp;lt;socket&amp;gt; in a listening state&lt;br /&gt;
* [[Core Function SocketReceive|SocketReceive( &amp;lt;socket&amp;gt;, &amp;lt;buffersize&amp;gt;  )]] -- Receives data from a bound &amp;lt;socket&amp;gt; into a receive buffer&lt;br /&gt;
* [[Core Function SocketReadChar|SocketReadChar( &amp;lt;socket&amp;gt;, &amp;lt;count&amp;gt;  )]] -- Receives a single (or a specified amount) of char(s) from a bound &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketReadLine|SocketReadLine( &amp;lt;socket&amp;gt;  )]] -- Receives the next line from a bound &amp;lt;socket&amp;gt; (useful for Telnet style stuff)&lt;br /&gt;
* [[Core Function SocketSend|SocketSend( &amp;lt;socket&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketSendTo|SocketSendTo( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to the specified ip + port&lt;br /&gt;
* [[Core Function SocketSendFile|SocketSendFile( &amp;lt;socket&amp;gt;, &amp;lt;file-name&amp;gt;  )]] -- Sends a file as data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIP|SocketIP( &amp;lt;socket&amp;gt;, &amp;lt;remote/local&amp;gt;  )]] -- Get the Remote or Local IP of a socket&lt;br /&gt;
* [[Core Function SocketShutdown|SocketShutdown( &amp;lt;socket&amp;gt;, &amp;lt;shutdown-type&amp;gt;  )]] -- Disables sends and receives on a &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketPoll|SocketPoll( &amp;lt;socket&amp;gt;, &amp;lt;milliseconds&amp;gt;, &amp;lt;type&amp;gt;  )]] -- Sends a kind of ping to determine the status of the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketHandle|SocketHandle( &amp;lt;socket&amp;gt; )]] -- Gets the operating system handle for the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIsBound|SocketIsBound( &amp;lt;socket&amp;gt; )]] -- Gets a value that indicates whether the &amp;lt;socket&amp;gt; is bound to a specific local port&lt;br /&gt;
* [[Core Function SocketOpt|SocketOpt( &amp;lt;socket&amp;gt;, &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt;  )]] -- Get or Set a setting on a &amp;lt;socket&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Misc Network Functions =====&lt;br /&gt;
* [[Core Function HostResolve|HostResolve( &amp;lt;host name&amp;gt; )]] -- Resolves a host name such as google.com into an IP address&lt;br /&gt;
* [[Core Function Ping|Ping( &amp;lt;ip address/host name&amp;gt; )]] -- Pings a host and returns the roundtrip-time&lt;br /&gt;
&lt;br /&gt;
==== Memory Functions ====&lt;br /&gt;
* [[Core Function Alloc|Alloc( &amp;lt;size&amp;gt;, &amp;lt;filler&amp;gt; )]] -- Allocate memory and return the pointer to it&lt;br /&gt;
* [[Core Function Realloc|Realloc( &amp;lt;ptr&amp;gt;, &amp;lt;size&amp;gt; )]] -- Resizes a block of memory previously allocated with Alloc()&lt;br /&gt;
* [[Core Function Free|Free( &amp;lt;ptr&amp;gt; )]] -- Deallocate memory from a pointer&lt;br /&gt;
* [[Core Function StringToPTR|StringToPTR( &amp;lt;type&amp;gt;, &amp;lt;string&amp;gt; )]] -- Allocates memory for the string and writes the string to that memory and returns the pointer for that memory&lt;br /&gt;
* [[Core Function PTRToString|PTRToString( &amp;lt;type&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a string from a memory pointer&lt;br /&gt;
* [[Core Function PTRRead|PTRRead( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Read data from a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRWrite|PTRWrite( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;value&amp;gt; )]] -- Write data to a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRToDLLStruct|PTRToDLLStruct( &amp;lt;def string&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a DLLStruct from a memory pointer&lt;br /&gt;
* [[Core Function DLLStructCreateDef|DLLStructCreateDef( &amp;lt;name&amp;gt;, &amp;lt;def string&amp;gt; )]] -- Creates a named C/C++ style structure definition that can be used with DLLStructCreate and can also be placed inside other DLLStructs&lt;br /&gt;
* [[Core Function DLLStructGetDef|DLLStructGetDef( &amp;lt;name&amp;gt;/&amp;lt;dllstruct&amp;gt; )]] -- Return the &amp;lt;def string&amp;gt; of a given DLLStruct&lt;br /&gt;
* [[Core Function DLLStructCreate|DLLStructCreate( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructCreateUnion|DLLStructCreateUnion( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure (union) to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructGetData|DLLStructGetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the data of an element of the struct&lt;br /&gt;
* [[Core Function DLLStructSetData|DLLStructSetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Set the data of an element of the struct&lt;br /&gt;
* [[Core Function DllStructGetSize|DLLStructGetSize( &amp;lt;dllstruct&amp;gt; )]] -- Returns the size of the struct in bytes&lt;br /&gt;
* [[Core Function DllStructGetPtr|DLLStructGetPtr( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the pointer to the struct or an element in the struct or even a specific index of an array object within an elment&lt;br /&gt;
* [[Core Function DllStructGetVars|DLLStructGetVars( &amp;lt;dllstruct&amp;gt; )]] -- Create an array of all items and their array size with total byte size&lt;br /&gt;
&lt;br /&gt;
==== Clipboard Functions ====&lt;br /&gt;
* [[Core Function ClipGet|ClipGet( &amp;lt;type&amp;gt; )]] -- Get data from the clipboard&lt;br /&gt;
* [[Core Function ClipSet|ClipSet( &amp;lt;type&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set data to the clipboard&lt;br /&gt;
&lt;br /&gt;
==== Registry Functions ====&lt;br /&gt;
* [[Core Function RegRead|RegRead( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;default&amp;gt; )]] -- Reads a value from the registry&lt;br /&gt;
* [[Core Function RegWrite|RegWrite( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Sets a value in the registry&lt;br /&gt;
* [[Core Function RegDelete|RegDelete( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Delete a key or value from the registry&lt;br /&gt;
* [[Core Function RegKeyList|RegKeyList( &amp;lt;key&amp;gt; )]] -- Return an array of all the keys at this location in the registry&lt;br /&gt;
* [[Core Function RegValueList|RegValueList( &amp;lt;key&amp;gt; )]] -- Return an array of all the values at this location in the registry&lt;br /&gt;
* [[Core Function RegKeyExists|RegKeyExists( &amp;lt;key&amp;gt; )]] -- Check if a key exists in the registry&lt;br /&gt;
* [[Core Function RegValueExists|RegValueExists( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a key value in the registry&lt;br /&gt;
&lt;br /&gt;
==== Time &amp;amp; Date Functions ====&lt;br /&gt;
* [[Core Function Time|Time( &amp;lt;array&amp;gt; )]] -- Returns the current time or calculates the time in seconds from an associative array&lt;br /&gt;
* [[Core Function MicroTime|MicroTime( &amp;lt;returnAsDouble&amp;gt; )]] -- Returns the current Unix timestamp with microseconds&lt;br /&gt;
* [[Core Function Date|Date( &amp;lt;format&amp;gt;, &amp;lt;time&amp;gt; )]] -- Returns a string with the date and time formatted according to the format given. If no time is supplied defaults to the current time&lt;br /&gt;
* [[Core Function TimerInit|TimerInit( )]] -- Returns a handle that can be passed to TimerDiff() to calculate the difference in milliseconds&lt;br /&gt;
* [[Core Function TimerDiff|TimerDiff( &amp;lt;handle&amp;gt; )]] -- Returns the difference in time from a previous call to TimerInit()&lt;br /&gt;
* [[Core Function Sleep|Sleep( &amp;lt;milliseconds&amp;gt;, &amp;lt;doEvents&amp;gt; )]] -- Pause the current executing thread for the given milliseconds&lt;br /&gt;
* [[Core Function USleep|USleep( &amp;lt;microseconds&amp;gt; )]] -- Pause the current executing thread for the given microseconds&lt;br /&gt;
* [[Core Function TickCount|TickCount( &amp;lt;ticks&amp;gt; )]] -- Retrieves the number of milliseconds that have elapsed since the current instance of Sputnik was started&lt;br /&gt;
&lt;br /&gt;
==== Old GUI Functions ====&lt;br /&gt;
&lt;br /&gt;
All the functions below are part of the SputnikOldGUI.dll basically these functions are *to be* depreciated and replaced with something much better in the future.&lt;br /&gt;
&lt;br /&gt;
However you can still use these and even after they have been replaced with a new GUI system you will still be able to use these functions (and GUI programs made with them) anyway by using the SputnikOldGUI.dll into your project.&lt;br /&gt;
&lt;br /&gt;
To use any of these functions you must include the SputnikOldGUI.dll to do that you must add this code to the top of your script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of using &amp;quot;GUICreate&amp;quot; in a full example and including the SputnikOldGUI.dll&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Load the old GUI system&lt;br /&gt;
// Since this an old GUI example&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
// Create the GUI&lt;br /&gt;
Global $GUI = GUICreate(&amp;quot;Window&amp;quot;, &amp;quot;My Title&amp;quot;, 200, 200);&lt;br /&gt;
// Create a button -- This button will simply display a message&lt;br /&gt;
Global $Button = GUICreate(&amp;quot;Button&amp;quot;, $GUI, &amp;quot;Press Me!&amp;quot;, 8, 8);&lt;br /&gt;
// Add a link to the button&lt;br /&gt;
GUILink($Button, &amp;quot;Click&amp;quot;, 'myFunction();'); // Call function&lt;br /&gt;
// Show the GUI&lt;br /&gt;
GUILoad( $GUI );&lt;br /&gt;
// Keep the GUI running as long as long as the window is open&lt;br /&gt;
While ( GUIStatus( $GUI ) ) &lt;br /&gt;
	DoEvents( ); &lt;br /&gt;
// This function is called when the button is clicked&lt;br /&gt;
Function myFunction()&lt;br /&gt;
{&lt;br /&gt;
	MsgBox(&amp;quot;Hello from the button&amp;quot;);&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make note however that the examples below do not include the SputnikOldGUI.dll in their scripts you must do that part yourself!.&lt;br /&gt;
&lt;br /&gt;
===== Dialog Creation Functions =====&lt;br /&gt;
* [[Core Function GUIMDICreate|GUICreate( &amp;quot;MDIWindow&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI Multi-Document-Interface window&lt;br /&gt;
* [[Core Function GUICreate|GUICreate( &amp;quot;Window&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI window&lt;br /&gt;
* [[Core Function DoEvents|DoEvents( )]] -- Keep GUI windows active by dispatching all messages in the queue&lt;br /&gt;
* [[Core Function GUILoad|GUILoad( &amp;lt;GUI Window&amp;gt; )]] -- Load a GUI window and display it (Usually after creation or after GUIUnload)&lt;br /&gt;
* [[Core Function GUIUnload|GUIUnload( &amp;lt;GUI Window&amp;gt; )]] -- Unload a GUI window and hide it (GUILoad will bring it back)&lt;br /&gt;
* [[Core Function GUIMDIParent|GUIMDIParent( &amp;lt;GUI Window&amp;gt;, &amp;lt;GUI Window&amp;gt; )]] -- Set the parent window (An MDI window) for another window to be created inside it&lt;br /&gt;
&lt;br /&gt;
===== Control Creation Functions =====&lt;br /&gt;
* [[Core Function GUICreateButton|GUICreate( &amp;quot;Button&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Button&lt;br /&gt;
* [[Core Function GUICreateDataGrid|GUICreate( &amp;quot;DataGrid&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DataGrid&lt;br /&gt;
* [[Core Function GUICreateTimer|GUICreate( &amp;quot;Timer&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Interval&amp;gt; )]] -- Create a Timer&lt;br /&gt;
* [[Core Function GUICreateComboBox|GUICreate( &amp;quot;ComboBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ComboBox&lt;br /&gt;
* [[Core Function GUICreateTextBox|GUICreate( &amp;quot;TextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TextBox&lt;br /&gt;
* [[Core Function GUICreateTextBoxEx|GUICreate( &amp;quot;TextBoxEx&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Multiline TextBox&lt;br /&gt;
* [[Core Function GUICreateLabel|GUICreate( &amp;quot;Label&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Label&lt;br /&gt;
* [[Core Function GUICreateGroupBox|GUICreate( &amp;quot;GroupBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a GroupBox&lt;br /&gt;
* [[Core Function GUICreatePictureBox|GUICreate( &amp;quot;PictureBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a PictureBox&lt;br /&gt;
* [[Core Function GUICreateProgressBar|GUICreate( &amp;quot;ProgressBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ProgressBar&lt;br /&gt;
* [[Core Function GUICreateListBox|GUICreate( &amp;quot;ListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListBox&lt;br /&gt;
* [[Core Function GUICreateContextMenu|GUICreate( &amp;quot;ContextMenu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Context Menu which is used when right clicking the object&lt;br /&gt;
* [[Core Function GUICreateMenu|GUICreate( &amp;quot;Menu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Menu&lt;br /&gt;
* [[Core Function GUICreateMenuItem|GUICreate( &amp;quot;MenuItem&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt; )]] -- Create a MenuItem&lt;br /&gt;
* [[Core Function GUICreateTabSheet|GUICreate( &amp;quot;TabSheet&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabSheet&lt;br /&gt;
* [[Core Function GUICreateTabPage|GUICreate( &amp;quot;TabPage&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabPage&lt;br /&gt;
* [[Core Function GUICreateRichTextBox|GUICreate( &amp;quot;RichTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RichTextBox&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Creates a source code editor textbox the same as the one used in the Sputnik IDE&lt;br /&gt;
* [[Core Function GUICreateCheckBox|GUICreate( &amp;quot;CheckBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckBox&lt;br /&gt;
* [[Core Function GUICreateRadioButton|GUICreate( &amp;quot;RadioButton&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RadioButton&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a textbox with syntax highlight and support for multiple and custom languages (Same thing Sputnik IDE uses)&lt;br /&gt;
* [[Core Function GUICreateHotkeyBox|GUICreate( &amp;quot;HotKeyBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a hotkeybox which a user can press a hotkey into it so you can make use of it&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function GUICreateDateTimePicker|GUICreate( &amp;quot;DateTimePicker&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DateTimePicker&lt;br /&gt;
* [[Core Function GUICreateLinkLabel|GUICreate( &amp;quot;LinkLabel&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a LinkLabel&lt;br /&gt;
* [[Core Function GUICreateCheckedListBox|GUICreate( &amp;quot;CheckedListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckedListBox&lt;br /&gt;
* [[Core Function GUICreateListView|GUICreate( &amp;quot;ListView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListView&lt;br /&gt;
* [[Core Function GUICreateMaskedTextBox|GUICreate( &amp;quot;MaskedTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MaskedTextBox&lt;br /&gt;
* [[Core Function GUICreateMonthCalendar|GUICreate( &amp;quot;MonthCalendar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MonthCalendar&lt;br /&gt;
* [[Core Function GUICreateNumericUpDown|GUICreate( &amp;quot;NumericUpDown&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a NumericUpDown&lt;br /&gt;
* [[Core Function GUICreateToolTip|GUICreate( &amp;quot;ToolTip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolTip&lt;br /&gt;
* [[Core Function GUICreateTreeView|GUICreate( &amp;quot;TreeView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TreeView&lt;br /&gt;
* [[Core Function GUICreateWebBrowser|GUICreate( &amp;quot;WebBrowser&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a WebBrowser&lt;br /&gt;
* [[Core Function GUICreateStatusBar|GUICreate( &amp;quot;StatusBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a StatusBar&lt;br /&gt;
* [[Core Function GUICreateToolStrip|GUICreate( &amp;quot;ToolStrip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolStrip&lt;br /&gt;
&lt;br /&gt;
===== Window/Control Properties Get/Set Functions =====&lt;br /&gt;
&lt;br /&gt;
Note - Any options not here are most likely found using GUIGetProp and GUISetProp the bulk of all props can be found/used in them 2 funtions however anything special and not generic will go in the functions below.&lt;br /&gt;
&lt;br /&gt;
* [[Core Function GUIWindow|GUIWindow( &amp;lt;window&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Windows&lt;br /&gt;
* [[Core Function GUIRichTextBox|GUIRichTextBox( &amp;lt;richtextbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RichTextBox&lt;br /&gt;
* [[Core Function GUIDataGrid|GUIDataGrid( &amp;lt;datagrid&amp;gt; )]] -- Properties &amp;amp; Functions specifically for DataGrid&lt;br /&gt;
* [[Core Function GUITimer|GUITimer( &amp;lt;timer&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Timer&lt;br /&gt;
* [[Core Function GUICodeBox|GUIComboBox( &amp;lt;codebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CodeBox&lt;br /&gt;
* [[Core Function GUIComboBox|GUIComboBox( &amp;lt;combobox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ComboBox&lt;br /&gt;
* [[Core Function GUICheckBox|GUICheckBox( &amp;lt;checkbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CheckBox&lt;br /&gt;
* [[Core Function GUIRadioButton|GUIRadioButton( &amp;lt;radiobutton&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RadioButton&lt;br /&gt;
* [[Core Function GUIHotkeyBox|GUIHotkeyBox( &amp;lt;hotkeybox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for HotkeyBox&lt;br /&gt;
* [[Core Function GUIListBox|GUIListBox( &amp;lt;listbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ListBox&lt;br /&gt;
* [[Core Function GUITabSheet|GUITabSheet( &amp;lt;tabsheet&amp;gt; )]] -- Properties &amp;amp; Functions specifically for TabSheet&lt;br /&gt;
* [[Core Function GUIProgressBar|GUIProgressBar( &amp;lt;progressbar&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ProgressBar&lt;br /&gt;
* [[Core Function GUIPictureBox|GUIPictureBox( &amp;lt;picturebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for PictureBox&lt;br /&gt;
* [[Core Function GUIMsgFilter|GUIMsgFilter( &amp;lt;gui object&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all messages windows sends to the GUI object (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
* [[Core Function GUIWndProc|GUIWndProc( &amp;lt;gui&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all the WindProc messages windows sends to the GUI window (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
&lt;br /&gt;
===== Common Dialog/Control Properties Get/Set Functions =====&lt;br /&gt;
* [[Core Function GUIGetProp|GUIGetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt; )]] -- Get the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUISetProp|GUISetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUIGetPropList|GUIGetPropList( &amp;lt;gui object&amp;gt;, &amp;lt;searchfor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get an array of the the names and types of all compatible/incompatible/all properties that the GUI object offers&lt;br /&gt;
&lt;br /&gt;
===== GUI Link (Event) Functions =====&lt;br /&gt;
* [[Core Function GUILink|GUILink( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt;, &amp;lt;action&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Add an event (link) to a GUI object such as Click, MouseDown etc&lt;br /&gt;
* [[Core Function GUILinkValid|GUILinkValid( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt; )]] -- Check if a given event (link) is valid for the given GUI object&lt;br /&gt;
&lt;br /&gt;
===== Graphics/Pixel Functions =====&lt;br /&gt;
* [[Core Function Colour|Colour( &amp;lt;name&amp;gt; )]] -- Get the colour INT value of a given colours name&lt;br /&gt;
* [[Core Function ColourDialog|ColourDialog( )]] -- Allows the user to select a colour and allows you to get the RED, GREEN, BLUE etc values&lt;br /&gt;
* [[Core Function FontDialog|FontDialog( &amp;lt;font&amp;gt; )]] -- Allows the user to select a font and allows you to get the Name, size, bold etc values&lt;br /&gt;
&lt;br /&gt;
===== Bitmap Functions =====&lt;br /&gt;
* [[Core Function BitmapCreate|BitmapCreate( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Create a new blank bitmap object&lt;br /&gt;
* [[Core Function BitmapGetPixel|BitmapGetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Get a pixel on a bitmap object&lt;br /&gt;
* [[Core Function BitmapSetPixel|BitmapSetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;colour&amp;gt; )]] -- Alter a pixel on a bitmap object&lt;br /&gt;
&lt;br /&gt;
===== Other GUI Functions =====&lt;br /&gt;
* [[Core Function GUIStatus|GUIStatus( &amp;lt;gui window&amp;gt; )]] -- Check if a GUI window is loaded or unloaded&lt;br /&gt;
* [[Core Function GUIHideCaret|GUIHideCaret( &amp;lt;gui object&amp;gt; )]] -- Hide the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIShowCaret|GUIShowCaret( &amp;lt;gui object&amp;gt; )]] -- Show the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIRedraw|GUIRedraw( &amp;lt;gui object&amp;gt; )]] -- Redraw the object&lt;br /&gt;
* [[Core Function GUICreateFont|GUICreate( &amp;quot;Font&amp;quot;, &amp;lt;name&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Create a Font&lt;br /&gt;
* [[Core Function MsgBox|MsgBox( &amp;lt;message&amp;gt;, &amp;lt;title&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Show a message dialog&lt;br /&gt;
* [[Core Function InputBox|InputBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input text&lt;br /&gt;
* [[Core Function InputBoxEx|InputBoxEx( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input multiple lines of text&lt;br /&gt;
* [[Core Function ChoiceBox|ChoiceBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows a window with choices for the user to pick from either none/one or many choices can be allowed&lt;br /&gt;
* [[Core Function ToolTip|ToolTip( &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Creates a tooltip anywhere on the screen&lt;br /&gt;
* [[Core Function ToolTipKill|ToolTipKill( &amp;lt;ToolTip&amp;gt; )]] -- Delete a tooltip that was made using ToolTip()&lt;br /&gt;
* [[Core Function PSet|PSet( &amp;lt;gui object&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;object&amp;gt; )]] -- Draw at a pixel&lt;br /&gt;
* [[Core Function GUISendToBack|GUISendToBack( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the back of the ZOrder&lt;br /&gt;
* [[Core Function GUIBringToFront|GUIBringToFront( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the front of the ZOrder&lt;br /&gt;
&lt;br /&gt;
===== Variable Type Checking etc =====&lt;br /&gt;
* [[Core Function isVarGUIObject|isVarGUIObject( $variable )]] -- Check if a variable holds a GUI Object&lt;br /&gt;
* [[Core Function GetVarGUIObjType|GetVarGUIObjType( $variable )]] -- Get the common object type of a variable (If it is a GUI object)&lt;br /&gt;
&lt;br /&gt;
==== Keyboard Control Functions ====&lt;br /&gt;
* [[Core Function HotKeySet|HotKeySet( &amp;lt;keydef&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Create a custom hotkey to run custom code or execute a function&lt;br /&gt;
* [[Core Function SendKeys|SendKeys( &amp;lt;keydef&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends simulated keystrokes to the active window&lt;br /&gt;
* [[Core Function RealGetKeyState|RealGetKeyState( &amp;lt;vk_keycode/expression&amp;gt; )]] -- Checks if a key or series of keys is pressed down&lt;br /&gt;
* [[Core Function KeyHook|KeyHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide Keyhook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Mouse Control Functions ====&lt;br /&gt;
* [[Core Function MouseClick|MouseClick ( &amp;lt;button&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click operation&lt;br /&gt;
* [[Core Function MouseClickDrag|MouseClickDrag ( &amp;lt;button&amp;gt;, &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click and drag operation&lt;br /&gt;
* [[Core Function MouseDown|MouseDown ( &amp;lt;button&amp;gt; )]] -- Perform a mouse down event at the current mouse position&lt;br /&gt;
* [[Core Function MouseUp|MouseUp ( &amp;lt;button&amp;gt; )]] -- Perform a mouse up event at the current mouse position&lt;br /&gt;
* [[Core Function MouseMove|MouseMove ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves the mouse pointer&lt;br /&gt;
* [[Core Function MouseGetPos|MouseGetPos ( )]] -- Retrieves the current position of the mouse cursor&lt;br /&gt;
* [[Core Function MouseWheel|MouseWheel ( &amp;lt;direction&amp;gt;, &amp;lt;clicks&amp;gt; )]] -- Moves the mouse wheel up or down&lt;br /&gt;
* [[Core Function MouseHook|MouseHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide MouseHook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Window Management Functions ====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function WinActivate|WinActivate ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Activates (gives focus to) a window&lt;br /&gt;
* [[Core Function WinActive|WinActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists and is currently active&lt;br /&gt;
* [[Core Function WinExists|WinExists ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists&lt;br /&gt;
* [[Core Function WinGetClassList|WinGetClassList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the classes from a window&lt;br /&gt;
* [[Core Function WinGetHandle|WinGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the internal handle of a window&lt;br /&gt;
* [[Core Function WinGetPos|WinGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the position and size of a given window&lt;br /&gt;
* [[Core Function WinGetCaretPos|WinGetCaretPos ( )]] -- Returns the coordinates of the caret in the foreground window&lt;br /&gt;
* [[Core Function WinGetTitle|WinGetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the full title from a window&lt;br /&gt;
* [[Core Function WinGetText|WinGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the text from a window&lt;br /&gt;
* [[Core Function WinGetState|WinGetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the state of a given window&lt;br /&gt;
* [[Core Function WinGetProcess|WinGetProcess ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the Process ID (PID) associated with a window&lt;br /&gt;
* [[Core Function WinGetClientSize|WinGetClientSize ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the size of a given window's client area&lt;br /&gt;
* [[Core Function WinClose|WinClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Closes a window&lt;br /&gt;
* [[Core Function WinKill|WinKill ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Forces a window to close&lt;br /&gt;
* [[Core Function WinMove|WinMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves and/or resizes a window&lt;br /&gt;
* [[Core Function WinWait|WinWait ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window exists&lt;br /&gt;
* [[Core Function WinWaitActive|WinWaitActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is active&lt;br /&gt;
* [[Core Function WinWaitNotActive|WinWaitNotActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is not active&lt;br /&gt;
* [[Core Function WinWaitClose|WinWaitClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window does not exist&lt;br /&gt;
* [[Core Function WinSetTitle|WinSetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;newtitle&amp;gt; )]] -- Changes the title of a window&lt;br /&gt;
* [[Core Function WinSetState|WinSetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows, hides, minimizes, maximizes, or restores a window&lt;br /&gt;
* [[Core Function WinSetTrans|WinSetTrans ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;transparency&amp;gt; )]] -- Sets the transparency of a window&lt;br /&gt;
* [[Core Function WinMinimizeAll|WinMinimizeAll  ( )]] -- Minimizes all windows&lt;br /&gt;
* [[Core Function WinMinimizeAllUndo|WinMinimizeAllUndo ( )]] -- Undoes a previous WinMinimizeAll function&lt;br /&gt;
* [[Core Function WinFlash|WinFlash ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flashes&amp;gt;, &amp;lt;delay&amp;gt; )]] -- Flashes a window in the taskbar&lt;br /&gt;
* [[Core Function WinMenuSelectItem|WinMenuSelectItem( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;item&amp;gt;, &amp;lt;subitems&amp;gt; ... )]] -- Invokes a menu item of a window&lt;br /&gt;
* [[Core Function WinList|WinList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves a list of windows&lt;br /&gt;
&lt;br /&gt;
===== Controls =====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ControlClick|ControlClick ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;button&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Sends a mouse click command to a given control&lt;br /&gt;
* [[Core Function ControlSend|ControlSend ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;string&amp;gt; &amp;lt;flag&amp;gt; )]] -- Sends a string of characters to a control&lt;br /&gt;
* [[Core Function ControlGetFocus|ControlGetFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Returns the ControlRef# of the control that has keyboard focus within a specified window&lt;br /&gt;
* [[Core Function ControlGetPos|ControlGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the position and size of a control relative to it's window&lt;br /&gt;
* [[Core Function ControlDisable|ControlDisable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Disables a control&lt;br /&gt;
* [[Core Function ControlEnable|ControlEnable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Enables a control&lt;br /&gt;
* [[Core Function ControlShow|ControlShow ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Shows a control that was hidden&lt;br /&gt;
* [[Core Function ControlHide|ControlHide ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Hides a control&lt;br /&gt;
* [[Core Function ControlGetText|ControlGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves text from a control&lt;br /&gt;
* [[Core Function ControlSetText|ControlSetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;text&amp;gt; )]] -- Sets text of a control&lt;br /&gt;
* [[Core Function ControlMove|ControlMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves a control within a window&lt;br /&gt;
* [[Core Function ControlGetHandle|ControlGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the internal handle of a control&lt;br /&gt;
* [[Core Function ControlFocus|ControlFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Sets input focus to a given control on a window&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function ControlCommand|ControlCommand ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;option&amp;gt; )]] -- Sends a command to a control&lt;br /&gt;
&lt;br /&gt;
==== Graphics/Pixel Functions ====&lt;br /&gt;
* [[Core Function PixelGetColour|PixelGetColour ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Returns a pixel colour according to x, y pixel coordinates&lt;br /&gt;
* [[Core Function PixelGetMouse|PixelGetMouse ( )]] -- Returns a pixel colour according to x, y position of the mouse pointer&lt;br /&gt;
* [[Core Function PixelSearch|PixelSearch ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelSearchHWND|PixelSearchHWND ( &amp;lt;hwnd&amp;gt;, &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelChecksum|PixelChecksum ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;step&amp;gt;, &amp;lt;hwnd&amp;gt; )]] -- Generates a checksum for a region of pixels&lt;br /&gt;
* [[Core Function RGB|RGB( &amp;lt;red&amp;gt;, &amp;lt;green&amp;gt;, &amp;lt;blue&amp;gt; )]] -- Get the colour INT value of given red, green and blue bytes&lt;br /&gt;
* [[Core Function GetRValue|GetRValue( &amp;lt;colour&amp;gt; )]] -- Get the red byte from a colour INT value&lt;br /&gt;
* [[Core Function GetGValue|GetGValue( &amp;lt;colour&amp;gt; )]] -- Get the green byte from a colour INT value&lt;br /&gt;
* [[Core Function GetBValue|GetBValue( &amp;lt;colour&amp;gt; )]] -- Get the blue byte from a colour INT value&lt;br /&gt;
&lt;br /&gt;
==== Sputnik Plugins (Using .NET DLLs) ====&lt;br /&gt;
* [[Core Function Use|Use( &amp;lt;name/array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Load a Sputnik plugin&lt;br /&gt;
* [[Core Function Unuse|Unuse( &amp;lt;name&amp;gt; )]] -- ???&lt;br /&gt;
&lt;br /&gt;
==== Control Flow Functions ====&lt;br /&gt;
* [[Core Function Return|Return &amp;lt;expressions&amp;gt;]] -- Immediately ends execution of the current function, and returns its argument as the value of the function call. return will also end the execution of an Eval() statement or script file&lt;br /&gt;
* [[Core Function Throw|Throw( &amp;lt;expression&amp;gt; )]] -- Throw an exception&lt;br /&gt;
* [[Core Function Die|Die( &amp;lt;expression&amp;gt; )]] -- Gives an error and terminates the program&lt;br /&gt;
* [[Core Function Break|Break( &amp;lt;scopes&amp;gt; )]] -- Ends execution of the current loop&lt;br /&gt;
* [[Core Function Continue|Continue( &amp;lt;scopes&amp;gt; )]] -- Continue the execution of a loop at its next iteration&lt;br /&gt;
* [[Core Function Redo|Redo( )]] -- Continue the execution of a loop at the start of the current iteration&lt;br /&gt;
&lt;br /&gt;
==== Internal Class Management and Information ====&lt;br /&gt;
* [[Core Function ClassExists|ClassExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Class exists&lt;br /&gt;
* [[Core Function ClassList|ClassList( &amp;lt;expression&amp;gt;, &amp;lt;inherits&amp;gt; )]] -- Return an array of all user defined classes (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function ClassInfo|ClassInfo( &amp;lt;class-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* [[Core Function ClassStack|ClassStack( &amp;lt;variable&amp;gt; )]] -- Return a reference to a classes internal variable stack (as an array) (or set the class stack from an existing array)&lt;br /&gt;
* [[Core Function ClassName|ClassName( &amp;lt;variable&amp;gt; )]] -- Return the name of the class on a variable or a class this code is running inside of (automatically uses $this if no param is given)&lt;br /&gt;
* [[Core Function UnsetClass|UnsetClass( &amp;lt;class-name&amp;gt; )]] -- Delete a previous user defined Class from Sputnik&lt;br /&gt;
* [[Core Function New|New( &amp;lt;classConstruction&amp;gt; )]] -- Create a new instance of a given class name optionally with parameters to be sent to the __Construct function of the new class&lt;br /&gt;
* [[Core Function NewClass|newClass( &amp;lt;name&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a new instance of a class by its name as a string&lt;br /&gt;
* [[Core Function NewClassFromArray|NewClassFromArray( &amp;lt;name&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and an array of its values&lt;br /&gt;
* [[Core Function ConvertClass|ConvertClass( &amp;lt;oldClass&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and copy the values from another class&lt;br /&gt;
* [[Core Function IsOverloaded|IsOverloaded( &amp;lt;class&amp;gt;, &amp;lt;overload&amp;gt; )]] -- Check if a given cast/operator overload exists within a class&lt;br /&gt;
&lt;br /&gt;
==== Internal Function Management and Information ====&lt;br /&gt;
* [[Core Function FunctionExists|FunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Function exists&lt;br /&gt;
* [[Core Function FunctionList|FunctionList( &amp;lt;expression&amp;gt;, &amp;lt;class&amp;gt; )]] -- Return an array of all user defined functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function FunctionInfo|FunctionInfo( &amp;lt;function-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a function&lt;br /&gt;
* [[Core Function UnsetFunction|UnsetFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a previous user defined Function from Sputnik&lt;br /&gt;
* [[Core Function UnsetCoreFunction|UnsetCoreFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a core function from Sputnik&lt;br /&gt;
* [[Core Function CoreFunctionExists|CoreFunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Core Function exists&lt;br /&gt;
* [[Core Function CoreFunctionList|CoreFunctionList( &amp;lt;expression&amp;gt; )]] -- Return an array of all core functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function Eval|Eval( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;cleanup&amp;gt;, &amp;lt;printToReturn&amp;gt; )]] -- Evaluate a string as Sputnik code&lt;br /&gt;
* [[Core Function MKFunc|MKFunc(&amp;lt;params&amp;gt;, &amp;lt;body&amp;gt;)]] -- Create a user defined function to be called from a variable&lt;br /&gt;
* [[Core Function CallFunc|CallFunc( &amp;lt;function&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a user defined function contained in a variable&lt;br /&gt;
* [[Core Function Call|Call(&amp;lt;function/array&amp;gt;, &amp;lt;expressions&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
* [[Core Function CallArray|CallArray( &amp;lt;function/array&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
&lt;br /&gt;
==== Internal Enum Management and Information ====&lt;br /&gt;
* [[Core Function EnumExists|EnumExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Enum exists&lt;br /&gt;
* [[Core Function EnumList|EnumList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined enums (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetEnum|UnsetEnum( &amp;lt;enum-name&amp;gt; )]] -- Delete a previous user defined Enum from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLImport Management and Information ====&lt;br /&gt;
* [[Core Function DLLImportExists|DLLImportExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLImport exists&lt;br /&gt;
* [[Core Function DLLImportList|DLLImportList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllimports (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLImport|UnsetDLLImport( &amp;lt;dllimport-function-name&amp;gt; )]] -- Delete a function imported using the DLLImport() function&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLStruct Management and Information ====&lt;br /&gt;
* [[Core Function DLLStructExists|DLLStructExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLStruct exists&lt;br /&gt;
* [[Core Function DLLStructList|DLLStructList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllstructs (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLStruct|UnsetDLLStruct( &amp;lt;dllstruct-name&amp;gt; )]] -- Delete a previous user defined DLLStruct from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal Variable/Scope Information ====&lt;br /&gt;
* [[Core Function VarList|VarList( &amp;lt;varScope/class&amp;gt; )]] -- Obtain information on all variables that exist in a given scope or class&lt;br /&gt;
* [[Core Function VarTypeToString|VarTypeToString( &amp;lt;varType&amp;gt; )]] -- Convert a raw variable type into it's string representation&lt;br /&gt;
* [[Core Function VarTypeFromString|VarTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarObjTypeToString|VarObjTypeToString( &amp;lt;varObjType&amp;gt; )]] -- Convert a raw variable object type into it's string representation&lt;br /&gt;
* [[Core Function VarObjTypeFromString|VarObjTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable object type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarScopeToString|VarScopeToString( &amp;lt;varScope&amp;gt; )]] -- Convert a raw variable scope into it's string representation&lt;br /&gt;
* [[Core Function VarScopeFromString|VarScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable scope from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function ScopeToString|ScopeToString( &amp;lt;scope&amp;gt; )]] -- Convert a raw scope into it's string representation&lt;br /&gt;
* [[Core Function ScopeFromString|ScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a scope from it's string representation into it's raw type&lt;br /&gt;
&lt;br /&gt;
==== Eval Functions ====&lt;br /&gt;
* [[Core Function EvalSyntax|EvalSyntax( &amp;lt;expression&amp;gt; )]] -- Evaluate a string as Sputnik code but only check if it's syntax is valid&lt;br /&gt;
* [[Core Function EvalCreate|EvalCreate( )]] -- Create an Eval object for use with Eval()&lt;br /&gt;
* [[Core Function EvalSet|EvalSet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a variable inside an Eval Object&lt;br /&gt;
* [[Core Function EvalGet|EvalGet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get a from variable inside an Eval Object&lt;br /&gt;
&lt;br /&gt;
==== Misc Functions ====&lt;br /&gt;
* [[Core Function Exit|Exit( &amp;lt;exitCode&amp;gt; )]] -- Instantly terminate the program/script&lt;br /&gt;
* [[Core Function Assert|Assert( &amp;lt;toCheck&amp;gt;, &amp;lt;errorMsg&amp;gt; )]] -- Check if value is true (if so returns it) if it is not then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* [[Core Function Warn|Warn( &amp;lt;message&amp;gt; )]] -- Show a warning message with source file name and line number&lt;br /&gt;
* [[Core Function Clone|Clone( &amp;lt;object&amp;gt; )]] -- Create a clone of a clone-able object&lt;br /&gt;
* [[Core Function LineInfo|LineInfo( )]] -- Get a vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* [[Core Function GC|GC( &amp;lt;flag&amp;gt; )]] -- Use the garbage collector&lt;br /&gt;
* [[Core Function HWND|HWND( )]] -- Get the HWND of the hidden window used by this program (It handles hotkeys etc)&lt;br /&gt;
* [[Core Function Require|Require( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use&lt;br /&gt;
* [[Core Function Include|Include( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use and execute all expressions&lt;br /&gt;
* [[Core Function Opt|Opt( &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt; )]] -- Changes the operation of various Sputnik functions/parameters&lt;br /&gt;
* [[Core Function IsAdmin|IsAdmin( )]] -- Check if the script is running in admin mode or not (Run as administrator)&lt;br /&gt;
* [[Core Function ObjToVar|ObjToVar( &amp;lt;variable&amp;gt; )]] -- Convert a $variable's object to its compatible $variable data type&lt;br /&gt;
* [[Core Function VarToObj|VarToObj( &amp;lt;variable&amp;gt; )]] -- Convert a $variable to its compatible object (such as .NET base object)&lt;br /&gt;
&lt;br /&gt;
=== User Defined Functions ===&lt;br /&gt;
&lt;br /&gt;
These functions are created using Sputnik and are not part of the Sputnik core language.&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_Oct</id>
		<title>Core Function Oct</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_Oct"/>
				<updated>2015-10-07T21:27:50Z</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;
Oct( &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;
Converts an octal string into the numerical corresponding value.&lt;br /&gt;
&lt;br /&gt;
An octal number is preceded by a 0 and contains digits from 0 to 7 only. By calling the oct() function, there are two particular cases here – the expression will be interpreted as a hexadecimal string if begins wit 0x and as a binary string if it begins with 0b.&lt;br /&gt;
&lt;br /&gt;
If you want to convert numbers in or from a binary, octal or hexadecimal format you need to write them as literals, otherwise no automatic conversion will take place.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== string ====&lt;br /&gt;
&lt;br /&gt;
The string to use.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Octal numerical corresponding value of the input 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;
print oct(77), &amp;quot;\n&amp;quot;;        # it prints 63&lt;br /&gt;
&lt;br /&gt;
print oct('77'), &amp;quot;\n&amp;quot;;      # it prints 63&lt;br /&gt;
&lt;br /&gt;
print oct('077'), &amp;quot;\n&amp;quot;;     # it prints 63&lt;br /&gt;
&lt;br /&gt;
print oct(077), &amp;quot;\n&amp;quot;;       # it prints 51&lt;br /&gt;
# because 077 is an octal number, first it will&lt;br /&gt;
# be converted to a decimal number, i.e. 63 and next&lt;br /&gt;
# oct(63) means 51&lt;br /&gt;
&lt;br /&gt;
print oct('2382'), &amp;quot;\n&amp;quot;;    # it prints 19&lt;br /&gt;
# this statement will work but it will ignore non octals&lt;br /&gt;
# because 8 is not a digit in the octal base; however, &lt;br /&gt;
# the rest of digits starting with 8 will be ignored and the oct&lt;br /&gt;
# function will convert the octal number 23 in decimal &lt;br /&gt;
&lt;br /&gt;
print oct('0x77'), &amp;quot;\n&amp;quot;;    # it prints 119&lt;br /&gt;
# '   0x77' is considered the hexadecimal number 77; &lt;br /&gt;
# converted in decimal this means 119; &lt;br /&gt;
# the leading spaces are ignored&lt;br /&gt;
&lt;br /&gt;
print oct('0b101'), &amp;quot;\n&amp;quot;;   # it prints 5&lt;br /&gt;
# '0b101' is considered the binary number 101; &lt;br /&gt;
# converted in decimal this means 5&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://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2015-10-07T00:59:50Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.34 @ 24-09-2015 05:45 AM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.35 @ 29-09-2015 12:17 AM ==&lt;br /&gt;
* Bitwise string stuff no longer casts each string char as a byte (thus losing data if its unicode) so it now correctly works with Sputniks unicode strings&lt;br /&gt;
* Fixed a bug where the list of classes a class inherits may get disordered resulting in some interesting things to happen&lt;br /&gt;
* Greatly improved speed of class magic functions: JsonSerialize() ShouldJsonSerialize() __Set() _Get() __IsSet() __Unset()&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would not call the class function __IsSet() with first param as 'Bar' at all&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a bug where unset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a glitch where if there is no class function __Unset() and you did unset($a['Bar']); it would try unset the elemnent&lt;br /&gt;
* Parent::FunctionName() will no longer give an error if you inherited more than one class and will instead use the first inherited class to locate the function if it is not found on the first it wil try the second and so on until it finds it&lt;br /&gt;
* Renamed function Use() to PluginLoad()&lt;br /&gt;
* Renamed function Unuse() to PluginUnload()&lt;br /&gt;
* Removed function TokenClass()&lt;br /&gt;
* Removed function IsToken()&lt;br /&gt;
* The parser no longer needs to use TokenClass()/IsToken() or ObjToVar() and as a result is more user friendly also it doesnt require pointers anymore (the calc example has been updated to show this change)&lt;br /&gt;
* Fixed a minor issue where Parse() might not return NULL on a certain failure&lt;br /&gt;
* You no longer need to have the __Construct() { } as an empty when using the parser you can now omit it entirely&lt;br /&gt;
* Renamed magic class function __call() to __invoke()&lt;br /&gt;
* Added magic class function __call() it has two arguments the first is a function name and the second is an array of params this will get called if you try call a class function that does not exist its name and arguments you tried to use will be passed to __call()&lt;br /&gt;
* Added magic class function __callStatic() it works similar to __call() but instead of working on an instance it works in static context only&lt;br /&gt;
* Call() no longer checks if you typed a static function&lt;br /&gt;
* CallArray() no longer checks if you typed a static function&lt;br /&gt;
* -&amp;gt;/=&amp;gt; no longer checks if you typed a static function&lt;br /&gt;
* class::function no longer tells you if you didnt type a static function&lt;br /&gt;
* self:: now shows an error if there is no self class found&lt;br /&gt;
* Removed requirements that enum (when using flags) values be divisible by 2 and and higher than 0 this means you get to decide what the number is and join multiple flags together however you should take care to make sure the number is valid&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on enums to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on functions to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Added UInteger() and the new cast (UInteger) for unsigned 64-bit integer (or highest available)&lt;br /&gt;
* You can now use the &amp;quot;Not&amp;quot; keyword instead of &amp;quot;!&amp;quot; for example if (NOT $a) is the same as if (!$a) &lt;br /&gt;
* You can now do $array .= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* You can now do $array ..= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* Fixed a bug where say(&amp;quot;CAT&amp;quot;) x 3 would print &amp;quot;CATCATCAT&amp;quot; instead of printing each one on a new line&lt;br /&gt;
* Fixed same bug as above this time time with xx instead of x&lt;br /&gt;
* You can now have infinite $ on your variable for use with Variable Variables like $$$$bar it will resolve each one&lt;br /&gt;
* Added IntDiv() it works like a normal $a / $b when using integers but does it in a function&lt;br /&gt;
* Added FDiv() it works like IntDiv() but for use with floating point numbers&lt;br /&gt;
* Fixed a bug where Switch() wasnt working properly with ranges and regex&lt;br /&gt;
* Fixed a bug in preprocessor where #predef and #unpredef would get confused by case now it is properly case insensitive&lt;br /&gt;
* Fixed a bug with the parser that caused the current instance of Sputnik to get lost on second parse when using preprocessor&lt;br /&gt;
* Fixed a bug where if you did a function name with no brackets like test; the &amp;quot;;&amp;quot; symbol would be used as its *first and only* param this has been fixed so now ; is omitted from any call this also means you can no longer use ; as a computable value&lt;br /&gt;
* As a result of the above fix you can now use redo; properly again in try/catch/finally&lt;br /&gt;
* You can now omit the ( ) when doing &amp;quot;my $Func = Function() { printr @Args; };&amp;quot; like so &amp;quot;my $Func = Function { printr @Args; };&amp;quot; this will cause the Args rule to set to TRUE automatically so you dont need to type it&lt;br /&gt;
* Added new macro @ArgCount this contains the number elements in @Args for functions with infinite params @ArgCount is basically Count(@Args)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.34 @ 24-09-2015 05:45 AM ==&lt;br /&gt;
* Unknown (was lost somehow)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.33 @ 20-09-2015 05:55 PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Foreach_As_Loop</id>
		<title>Foreach As Loop</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Foreach_As_Loop"/>
				<updated>2015-09-29T13:38:40Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Foreach As =&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Loop based on an expression.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foreach( &amp;lt;expression&amp;gt; as &amp;lt;value&amp;gt; )&lt;br /&gt;
{&lt;br /&gt;
    statements&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
foreach( &amp;lt;expression&amp;gt; as &amp;lt;value&amp;gt; from &amp;lt;offset&amp;gt; )&lt;br /&gt;
{&lt;br /&gt;
    statements&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
foreach( &amp;lt;expression&amp;gt; as &amp;lt;value&amp;gt; from &amp;lt;start&amp;gt; to &amp;lt;end&amp;gt; )&lt;br /&gt;
{&lt;br /&gt;
    statements&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== expression  ====&lt;br /&gt;
&lt;br /&gt;
An expression to use could equal an array, string, whatever.&lt;br /&gt;
&lt;br /&gt;
==== value  ====&lt;br /&gt;
&lt;br /&gt;
The value to place the result in most common as a $variable.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Foreach...As statements may be nested.&lt;br /&gt;
&lt;br /&gt;
If the expression contains an array the loop will cycle through each element in the array.&lt;br /&gt;
&lt;br /&gt;
If the expression contains a string or numbers it will cycle through each char.&lt;br /&gt;
&lt;br /&gt;
It is a bad idea to try edit the array while you are loop through it... Strange things may happen including hard crashes.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Are you trying use a Foreach on a string but getting Char data type when you want String for each char then see this example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$str = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
// Loop through the string as chars&lt;br /&gt;
// notice each one is a char data type&lt;br /&gt;
// this might cause problems if you expect&lt;br /&gt;
// to use it as a string see below for solution&lt;br /&gt;
foreach($str as my $c)&lt;br /&gt;
{&lt;br /&gt;
	echo vardump($c);&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// char'H'&lt;br /&gt;
// char'e'&lt;br /&gt;
// char'l'&lt;br /&gt;
// char'l'&lt;br /&gt;
// char'o'&lt;br /&gt;
&lt;br /&gt;
// Solution? Cast to string&lt;br /&gt;
foreach($str as my $c)&lt;br /&gt;
{&lt;br /&gt;
	$c = (string)$c;&lt;br /&gt;
	echo vardump($c);&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// string(1) &amp;quot;H&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;e&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;l&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;l&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;o&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using from&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Zero&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as $c from 1)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One&lt;br /&gt;
// Two&lt;br /&gt;
// Three&lt;br /&gt;
// Four&lt;br /&gt;
// Five&lt;br /&gt;
// Six&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using from and to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Zero&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as $c from 1 to 3)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One&lt;br /&gt;
// Two&lt;br /&gt;
// Three&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through binary data :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$binary = Pack(&amp;quot;ifz0&amp;quot;, (int)100, (float)777.42, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
foreach( $binary as $item )&lt;br /&gt;
{&lt;br /&gt;
	println( &lt;br /&gt;
			&amp;quot;Index '&amp;quot; . DecPad($item, 3) . &amp;quot;' &amp;quot; . &lt;br /&gt;
			&amp;quot;Dec '$item' &amp;quot; .  &lt;br /&gt;
			&amp;quot;Hex '&amp;quot; . Hex($item) . &amp;quot;' &amp;quot; . &lt;br /&gt;
			&amp;quot;Char '&amp;quot; . Chr($item) . &amp;quot;'&amp;quot;&lt;br /&gt;
			);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through an array :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = array( 2, 4, 6, 8, 10 );&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through each char in a string :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through each letter in a float :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = 777.42;&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also referance when using arrays using the pointer &amp;amp; operator for example :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = array( 2, 4, 6, 8, 10 );&lt;br /&gt;
foreach( $arr as &amp;amp; $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;); // Prints 2 4 6 8 10&lt;br /&gt;
	*$item *= 2;&lt;br /&gt;
	// notice the * before $item? this tells Sputnik&lt;br /&gt;
	// to resolve the Pointer and get the real value&lt;br /&gt;
	// then we can modify it&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;&amp;quot;);&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;); // Prints 4 8 12 16 20&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the &amp;amp; before $item on the first loop? This causes $item to actually LINK to the real element inside the array so changing $item will change the item in the array.&lt;br /&gt;
&lt;br /&gt;
This can be seen by printing the array after changing it in the example.&lt;br /&gt;
&lt;br /&gt;
Note - You can only change elements in an array! This will not work with anything else.&lt;br /&gt;
&lt;br /&gt;
A reverse foreach&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;Value $i&amp;quot;) foreach(&amp;quot;Hello world&amp;quot; as $i);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of unpacking nested arrays with list()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$array = array(&lt;br /&gt;
    array(1, 2),&lt;br /&gt;
    array(3, 4)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
foreach ($array as list($a, $b)) &lt;br /&gt;
{&lt;br /&gt;
    // $a contains the first element of the nested array,&lt;br /&gt;
    // and $b contains the second element.&lt;br /&gt;
    echo &amp;quot;A: $a; B: $b\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// A: 1; B: 2&lt;br /&gt;
// A: 3; B: 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example of unpacking nested arrays with list()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$array = array(&lt;br /&gt;
    array(1, 2, 3, 4),&lt;br /&gt;
    array(5, 6, 7, 8)&lt;br /&gt;
);&lt;br /&gt;
 &lt;br /&gt;
foreach ($array as list($a, $b, $c, $d)) &lt;br /&gt;
{&lt;br /&gt;
    // $a contains the first element of the nested array,&lt;br /&gt;
    // and $b contains the second element.&lt;br /&gt;
    echo &amp;quot;A: $a; B: $b; C: $c; D: $d\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// A: 1; B: 2; C: 3; D: 4&lt;br /&gt;
// A: 5; B: 6; C: 7; D: 8&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another example of unpacking nested arrays with list() however this one only works if there is only 1 element in each array (key, value) and it must be a hash and not numeric (like normal arrays)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$array = array(&lt;br /&gt;
    array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;),&lt;br /&gt;
    array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;),&lt;br /&gt;
    array(&amp;quot;Foo&amp;quot; =&amp;gt; &amp;quot;Bar&amp;quot;)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
foreach ($array as list($key, *$value)) &lt;br /&gt;
{&lt;br /&gt;
    // $a contains the first element of the nested array,&lt;br /&gt;
    // and $b contains the second element.&lt;br /&gt;
    echo &amp;quot;Key: $key | Value: $value\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Key: Cat | Value: Meow&lt;br /&gt;
// Key: Dog | Value: Woof&lt;br /&gt;
// Key: Foo | Value: Bar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Loop through a string and print each char but do it with a ref so we can modify the string in place&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing string&amp;quot;;&lt;br /&gt;
foreach($str as &amp;amp;$c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
	*$c = AscW(*$c) + 10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing modified string&amp;quot;;&lt;br /&gt;
foreach($str as $c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using List() with an array that contains no nested arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as list($k, $j))&lt;br /&gt;
{&lt;br /&gt;
	say &amp;quot;$k - $j&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One - Two&lt;br /&gt;
// Three - Four&lt;br /&gt;
// Five - Six&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but more arguments to extract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as list($k, $j, $l))&lt;br /&gt;
{&lt;br /&gt;
	say &amp;quot;$k - $j - $l&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One - Two - Three&lt;br /&gt;
// Four - Five - Six&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course unpacking only one argument is the same as a normal foreach&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as list($k))&lt;br /&gt;
{&lt;br /&gt;
	say &amp;quot;$k&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One&lt;br /&gt;
// Two&lt;br /&gt;
// Three&lt;br /&gt;
// Four&lt;br /&gt;
// Five&lt;br /&gt;
// Six&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://ubersoft.org/Sputnik/wiki/index.php/Foreach_As_Loop</id>
		<title>Foreach As Loop</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Foreach_As_Loop"/>
				<updated>2015-09-29T11:35:18Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Foreach As =&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Loop based on an expression.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foreach( &amp;lt;expression&amp;gt; as &amp;lt;value&amp;gt; )&lt;br /&gt;
{&lt;br /&gt;
    statements&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
foreach( &amp;lt;expression&amp;gt; as &amp;lt;value&amp;gt; from &amp;lt;offset&amp;gt; )&lt;br /&gt;
{&lt;br /&gt;
    statements&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
foreach( &amp;lt;expression&amp;gt; as &amp;lt;value&amp;gt; from &amp;lt;start&amp;gt; to &amp;lt;end&amp;gt; )&lt;br /&gt;
{&lt;br /&gt;
    statements&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== expression  ====&lt;br /&gt;
&lt;br /&gt;
An expression to use could equal an array, string, whatever.&lt;br /&gt;
&lt;br /&gt;
==== value  ====&lt;br /&gt;
&lt;br /&gt;
The value to place the result in most common as a $variable.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Foreach...As statements may be nested.&lt;br /&gt;
&lt;br /&gt;
If the expression contains an array the loop will cycle through each element in the array.&lt;br /&gt;
&lt;br /&gt;
If the expression contains a string or numbers it will cycle through each char.&lt;br /&gt;
&lt;br /&gt;
It is a bad idea to try edit the array while you are loop through it... Strange things may happen including hard crashes.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Are you trying use a Foreach on a string but getting Char data type when you want String for each char then see this example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$str = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
// Loop through the string as chars&lt;br /&gt;
// notice each one is a char data type&lt;br /&gt;
// this might cause problems if you expect&lt;br /&gt;
// to use it as a string see below for solution&lt;br /&gt;
foreach($str as my $c)&lt;br /&gt;
{&lt;br /&gt;
	echo vardump($c);&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// char'H'&lt;br /&gt;
// char'e'&lt;br /&gt;
// char'l'&lt;br /&gt;
// char'l'&lt;br /&gt;
// char'o'&lt;br /&gt;
&lt;br /&gt;
// Solution? Cast to string&lt;br /&gt;
foreach($str as my $c)&lt;br /&gt;
{&lt;br /&gt;
	$c = (string)$c;&lt;br /&gt;
	echo vardump($c);&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// string(1) &amp;quot;H&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;e&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;l&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;l&amp;quot;&lt;br /&gt;
// string(1) &amp;quot;o&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using from&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Zero&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as $c from 1)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One&lt;br /&gt;
// Two&lt;br /&gt;
// Three&lt;br /&gt;
// Four&lt;br /&gt;
// Five&lt;br /&gt;
// Six&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using from and to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Zero&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as $c from 1 to 3)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One&lt;br /&gt;
// Two&lt;br /&gt;
// Three&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through binary data :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$binary = Pack(&amp;quot;ifz0&amp;quot;, (int)100, (float)777.42, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
foreach( $binary as $item )&lt;br /&gt;
{&lt;br /&gt;
	println( &lt;br /&gt;
			&amp;quot;Index '&amp;quot; . DecPad($item, 3) . &amp;quot;' &amp;quot; . &lt;br /&gt;
			&amp;quot;Dec '$item' &amp;quot; .  &lt;br /&gt;
			&amp;quot;Hex '&amp;quot; . Hex($item) . &amp;quot;' &amp;quot; . &lt;br /&gt;
			&amp;quot;Char '&amp;quot; . Chr($item) . &amp;quot;'&amp;quot;&lt;br /&gt;
			);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through an array :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = array( 2, 4, 6, 8, 10 );&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through each char in a string :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we cycle through each letter in a float :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = 777.42;&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also referance when using arrays using the pointer &amp;amp; operator for example :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$arr = array( 2, 4, 6, 8, 10 );&lt;br /&gt;
foreach( $arr as &amp;amp; $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;); // Prints 2 4 6 8 10&lt;br /&gt;
	*$item *= 2;&lt;br /&gt;
	// notice the * before $item? this tells Sputnik&lt;br /&gt;
	// to resolve the Pointer and get the real value&lt;br /&gt;
	// then we can modify it&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;&amp;quot;);&lt;br /&gt;
foreach( $arr as $item )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Value is $item&amp;quot;); // Prints 4 8 12 16 20&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the &amp;amp; before $item on the first loop? This causes $item to actually LINK to the real element inside the array so changing $item will change the item in the array.&lt;br /&gt;
&lt;br /&gt;
This can be seen by printing the array after changing it in the example.&lt;br /&gt;
&lt;br /&gt;
Note - You can only change elements in an array! This will not work with anything else.&lt;br /&gt;
&lt;br /&gt;
A reverse foreach&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;Value $i&amp;quot;) foreach(&amp;quot;Hello world&amp;quot; as $i);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of unpacking nested arrays with list()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$array = array(&lt;br /&gt;
    array(1, 2),&lt;br /&gt;
    array(3, 4)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
foreach ($array as list($a, $b)) &lt;br /&gt;
{&lt;br /&gt;
    // $a contains the first element of the nested array,&lt;br /&gt;
    // and $b contains the second element.&lt;br /&gt;
    echo &amp;quot;A: $a; B: $b\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// A: 1; B: 2&lt;br /&gt;
// A: 3; B: 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example of unpacking nested arrays with list()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$array = array(&lt;br /&gt;
    array(1, 2, 3, 4),&lt;br /&gt;
    array(5, 6, 7, 8)&lt;br /&gt;
);&lt;br /&gt;
 &lt;br /&gt;
foreach ($array as list($a, $b, $c, $d)) &lt;br /&gt;
{&lt;br /&gt;
    // $a contains the first element of the nested array,&lt;br /&gt;
    // and $b contains the second element.&lt;br /&gt;
    echo &amp;quot;A: $a; B: $b; C: $c; D: $d\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// A: 1; B: 2; C: 3; D: 4&lt;br /&gt;
// A: 5; B: 6; C: 7; D: 8&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yet another example of unpacking nested arrays with list() however this one only works if there is only 1 element in each array (key, value) and it must be a hash and not numeric (like normal arrays)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$array = array(&lt;br /&gt;
    array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;),&lt;br /&gt;
    array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;),&lt;br /&gt;
    array(&amp;quot;Foo&amp;quot; =&amp;gt; &amp;quot;Bar&amp;quot;)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
foreach ($array as list($key, *$value)) &lt;br /&gt;
{&lt;br /&gt;
    // $a contains the first element of the nested array,&lt;br /&gt;
    // and $b contains the second element.&lt;br /&gt;
    echo &amp;quot;Key: $key | Value: $value\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Key: Cat | Value: Meow&lt;br /&gt;
// Key: Dog | Value: Woof&lt;br /&gt;
// Key: Foo | Value: Bar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Looping a .NET array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
use(&amp;quot;System&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$chars = %Char[]-&amp;gt;new(3);&lt;br /&gt;
$chars[0] = 'A';&lt;br /&gt;
$chars[1] = 'B';&lt;br /&gt;
$chars[2] = 'C';&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing&amp;quot;;&lt;br /&gt;
foreach($chars as $c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
// Printing&lt;br /&gt;
// A&lt;br /&gt;
// B&lt;br /&gt;
// C&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Looping a .NET array as a ref to modify its values in real time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
use(&amp;quot;System&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$chars = %Char[]-&amp;gt;new(3);&lt;br /&gt;
$chars[0] = 'A';&lt;br /&gt;
$chars[1] = 'B';&lt;br /&gt;
$chars[2] = 'C';&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing&amp;quot;;&lt;br /&gt;
foreach($chars as &amp;amp;$c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
	*$c = 'T';&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing modified array&amp;quot;;&lt;br /&gt;
foreach($chars as $c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
// Printing&lt;br /&gt;
// {REF}:A&lt;br /&gt;
// {REF}:B&lt;br /&gt;
// {REF}:C&lt;br /&gt;
// Printing modified array&lt;br /&gt;
// T&lt;br /&gt;
// T&lt;br /&gt;
// T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
use(&amp;quot;System&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$chars = %Char[]-&amp;gt;new(3);&lt;br /&gt;
$chars[0] = 'A';&lt;br /&gt;
$chars[1] = 'B';&lt;br /&gt;
$chars[2] = 'C';&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing&amp;quot;;&lt;br /&gt;
foreach($chars as &amp;amp;$c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
	*$c = AscW(*$c) + 10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing modified array&amp;quot;;&lt;br /&gt;
foreach($chars as $c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
// Printing&lt;br /&gt;
// {REF}:A&lt;br /&gt;
// {REF}:B&lt;br /&gt;
// {REF}:C&lt;br /&gt;
// Printing modified array&lt;br /&gt;
// K&lt;br /&gt;
// L&lt;br /&gt;
// M&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Loop through a string and print each char but do it with a ref so we can modify the string in place&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing string&amp;quot;;&lt;br /&gt;
foreach($str as &amp;amp;$c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
	*$c = AscW(*$c) + 10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Printing modified string&amp;quot;;&lt;br /&gt;
foreach($str as $c)&lt;br /&gt;
{&lt;br /&gt;
	say $c;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using List() with an array that contains no nested arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as list($k, $j))&lt;br /&gt;
{&lt;br /&gt;
	say &amp;quot;$k - $j&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One - Two&lt;br /&gt;
// Three - Four&lt;br /&gt;
// Five - Six&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but more arguments to extract&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as list($k, $j, $l))&lt;br /&gt;
{&lt;br /&gt;
	say &amp;quot;$k - $j - $l&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One - Two - Three&lt;br /&gt;
// Four - Five - Six&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course unpacking only one argument is the same as a normal foreach&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;, &amp;quot;Six&amp;quot;);&lt;br /&gt;
foreach($a as list($k))&lt;br /&gt;
{&lt;br /&gt;
	say &amp;quot;$k&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// One&lt;br /&gt;
// Two&lt;br /&gt;
// Three&lt;br /&gt;
// Four&lt;br /&gt;
// Five&lt;br /&gt;
// Six&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://ubersoft.org/Sputnik/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Main_Page"/>
				<updated>2015-09-28T23:18:24Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik Programming Language ==&lt;br /&gt;
&lt;br /&gt;
* [[What is Sputnik|What is Sputnik?]]&lt;br /&gt;
* [[The Team|The Team]]&lt;br /&gt;
* [[Language Reference|Language Reference]]&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
* [[Class Reference|Class Reference]]&lt;br /&gt;
* [[Version History|Version History]]&lt;br /&gt;
&lt;br /&gt;
Warning; Information on the wiki may not always be accurate to current downloadable version of Sputnik.&lt;br /&gt;
&lt;br /&gt;
However effort is taken to keep Sputnik compatible with older versions and any changes to that are for the better good overall.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
&lt;br /&gt;
[http://ubersoft.org/download/Sputnik35.rar Sputnik 0.35]&lt;br /&gt;
&lt;br /&gt;
(Extract download with [http://www.rarlab.com/download.htm WinRAR] 5.0 or higher)&lt;br /&gt;
&lt;br /&gt;
=== Contact ===&lt;br /&gt;
&lt;br /&gt;
UberFoX - Lead Programmer&lt;br /&gt;
&lt;br /&gt;
[mailto:uberfox@hotmail.com uberfox@hotmail.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Intro]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2015-09-28T23:17:28Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.34 @ 24-09-2015 05:45 AM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.35 @ 29-09-2015 12:17 AM ==&lt;br /&gt;
* Bitwise string stuff no longer casts each string char as a byte (thus losing data if its unicode) so it now correctly works with Sputniks unicode strings&lt;br /&gt;
* Fixed a bug where the list of classes a class inherits may get disordered resulting in some interesting things to happen&lt;br /&gt;
* Greatly improved speed of class magic functions: JsonSerialize() ShouldJsonSerialize() __Set() _Get() __IsSet() __Unset()&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would not call the class function __IsSet() with first param as 'Bar' at all&lt;br /&gt;
* Fixed a bug where isset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a bug where unset($a['Bar']); would call the class function __Get() when it shouldnt&lt;br /&gt;
* Fixed a glitch where if there is no class function __Unset() and you did unset($a['Bar']); it would try unset the elemnent&lt;br /&gt;
* Parent::FunctionName() will no longer give an error if you inherited more than one class and will instead use the first inherited class to locate the function if it is not found on the first it wil try the second and so on until it finds it&lt;br /&gt;
* Renamed function Use() to PluginLoad()&lt;br /&gt;
* Renamed function Unuse() to PluginUnload()&lt;br /&gt;
* Removed function TokenClass()&lt;br /&gt;
* Removed function IsToken()&lt;br /&gt;
* The parser no longer needs to use TokenClass()/IsToken() or ObjToVar() and as a result is more user friendly also it doesnt require pointers anymore (the calc example has been updated to show this change)&lt;br /&gt;
* Fixed a minor issue where Parse() might not return NULL on a certain failure&lt;br /&gt;
* You no longer need to have the __Construct() { } as an empty when using the parser you can now omit it entirely&lt;br /&gt;
* Renamed magic class function __call() to __invoke()&lt;br /&gt;
* Added magic class function __call() it has two arguments the first is a function name and the second is an array of params this will get called if you try call a class function that does not exist its name and arguments you tried to use will be passed to __call()&lt;br /&gt;
* Added magic class function __callStatic() it works similar to __call() but instead of working on an instance it works in static context only&lt;br /&gt;
* Call() no longer checks if you typed a static function&lt;br /&gt;
* CallArray() no longer checks if you typed a static function&lt;br /&gt;
* -&amp;gt;/=&amp;gt; no longer checks if you typed a static function&lt;br /&gt;
* class::function no longer tells you if you didnt type a static function&lt;br /&gt;
* self:: now shows an error if there is no self class found&lt;br /&gt;
* Removed requirements that enum (when using flags) values be divisible by 2 and and higher than 0 this means you get to decide what the number is and join multiple flags together however you should take care to make sure the number is valid&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on enums to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Renamed rule &amp;quot;override&amp;quot; on functions to &amp;quot;replace&amp;quot;&lt;br /&gt;
* Added UInteger() and the new cast (UInteger) for unsigned 64-bit integer (or highest available)&lt;br /&gt;
* You can now use the &amp;quot;Not&amp;quot; keyword instead of &amp;quot;!&amp;quot; for example if (NOT $a) is the same as if (!$a) &lt;br /&gt;
* You can now do $array .= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* You can now do $array ..= &amp;quot;Value&amp;quot; and no longer need to encase &amp;quot;Value&amp;quot; in array(&amp;quot;Value&amp;quot;)&lt;br /&gt;
* Fixed a bug where say(&amp;quot;CAT&amp;quot;) x 3 would print &amp;quot;CATCATCAT&amp;quot; instead of printing each one on a new line&lt;br /&gt;
* Fixed same bug as above this time time with xx instead of x&lt;br /&gt;
* You can now have infinite $ on your variable for use with Variable Variables like $$$$bar it will resolve each one&lt;br /&gt;
* Added IntDiv() it works like a normal $a / $b when using integers but does it in a function&lt;br /&gt;
* Added FDiv() it works like IntDiv() but for use with floating point numbers&lt;br /&gt;
* Fixed a bug where Switch() wasnt working properly with ranges and regex&lt;br /&gt;
* Fixed a bug in preprocessor where #predef and #unpredef would get confused by case now it is properly case insensitive&lt;br /&gt;
* Fixed a bug with the parser that caused the current instance of Sputnik to get lost on second parse when using preprocessor&lt;br /&gt;
* Fixed a bug where if you did a function name with no brackets like test; the &amp;quot;;&amp;quot; symbol would be used as its *first and only* param this has been fixed so now ; is omitted from any call this also means you can no longer use ; as a computable value&lt;br /&gt;
* As a result of the above fix you can now use redo; properly again in try/catch/finally&lt;br /&gt;
* You can now omit the ( ) when doing &amp;quot;my $Func = Function() { printr @Args; };&amp;quot; like so &amp;quot;my $Func = Function { printr @Args; };&amp;quot; this will cause the Args rule to set to TRUE automatically so you dont need to type it&lt;br /&gt;
* Added new macro @ArgCount this contains the number elements in @Args for functions with infinite params @ArgCount is basically Count(@Args)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.34 @ 24-09-2015 05:45 AM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.33 @ 20-09-2015 05:55 PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-27T11:57:03Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Operator ^= */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; ), 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if ($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray !== $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray eq $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neq $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if ($firstarray eqi $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neqi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray lt $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray gt $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray le $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray ge $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second (case insensitive)&lt;br /&gt;
if ($firstarray lti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray gti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray lei $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second (case insensitive)&lt;br /&gt;
if ($firstarray gei $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray lg $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second (case insensitive)&lt;br /&gt;
if ($firstarray lgi $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1)&lt;br /&gt;
if ($firstarray cmp $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
if ($firstarray cmpi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray &amp;lt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray &amp;gt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray &amp;lt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray &amp;gt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray &amp;lt;&amp;gt; $secondarray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an replacement that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Replace(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (Replace takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ^= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ^ 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-27T11:16:50Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Operator ^= */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; ), 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if ($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray !== $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray eq $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neq $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if ($firstarray eqi $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neqi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray lt $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray gt $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray le $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray ge $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second (case insensitive)&lt;br /&gt;
if ($firstarray lti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray gti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray lei $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second (case insensitive)&lt;br /&gt;
if ($firstarray gei $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray lg $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second (case insensitive)&lt;br /&gt;
if ($firstarray lgi $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1)&lt;br /&gt;
if ($firstarray cmp $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
if ($firstarray cmpi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray &amp;lt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray &amp;gt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray &amp;lt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray &amp;gt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray &amp;lt;&amp;gt; $secondarray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an replacement that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Replace(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (Replace takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ^= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T23:01:05Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Casting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; ), 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if ($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray !== $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray eq $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neq $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if ($firstarray eqi $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neqi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray lt $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray gt $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray le $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray ge $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second (case insensitive)&lt;br /&gt;
if ($firstarray lti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray gti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray lei $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second (case insensitive)&lt;br /&gt;
if ($firstarray gei $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray lg $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second (case insensitive)&lt;br /&gt;
if ($firstarray lgi $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1)&lt;br /&gt;
if ($firstarray cmp $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
if ($firstarray cmpi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray &amp;lt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray &amp;gt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray &amp;lt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray &amp;gt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray &amp;lt;&amp;gt; $secondarray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an replacement that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Replace(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (Replace takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T18:20:18Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Enum */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; ), 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if ($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray !== $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray eq $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neq $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if ($firstarray eqi $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neqi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray lt $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray gt $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray le $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray ge $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second (case insensitive)&lt;br /&gt;
if ($firstarray lti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray gti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray lei $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second (case insensitive)&lt;br /&gt;
if ($firstarray gei $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray lg $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second (case insensitive)&lt;br /&gt;
if ($firstarray lgi $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1)&lt;br /&gt;
if ($firstarray cmp $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
if ($firstarray cmpi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray &amp;lt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray &amp;gt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray &amp;lt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray &amp;gt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray &amp;lt;&amp;gt; $secondarray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an replacement that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Replace(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (Replace takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T18:07:15Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Arrays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; ), 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if ($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray !== $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray eq $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neq $secondarray)&lt;br /&gt;
// (As string) Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if ($firstarray eqi $secondarray)&lt;br /&gt;
// (As string) Reverse of above&lt;br /&gt;
if ($firstarray neqi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray lt $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray gt $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray le $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray ge $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second (case insensitive)&lt;br /&gt;
if ($firstarray lti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray gti $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray lei $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second (case insensitive)&lt;br /&gt;
if ($firstarray gei $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray lg $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second (case insensitive)&lt;br /&gt;
if ($firstarray lgi $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1)&lt;br /&gt;
if ($firstarray cmp $secondarray)&lt;br /&gt;
// (As string) Tests if two arrays are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
if ($firstarray cmpi $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than second&lt;br /&gt;
if ($firstarray &amp;lt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than second&lt;br /&gt;
if ($firstarray &amp;gt; $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray &amp;lt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray &amp;gt;= $secondarray)&lt;br /&gt;
// (As string) Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray &amp;lt;&amp;gt; $secondarray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T17:40:40Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Arrays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; ), 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if ($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if ($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if ($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if ($firstarray neqi $secondarray)&lt;br /&gt;
// Compare if first is lower than second&lt;br /&gt;
if ($firstarray lt $secondarray)&lt;br /&gt;
// Compare if first is greater than second&lt;br /&gt;
if ($firstarray gt $secondarray)&lt;br /&gt;
// Compare if first is lower than or equal to second&lt;br /&gt;
if ($firstarray le $secondarray)&lt;br /&gt;
// Compare if first is greater than or equal to second&lt;br /&gt;
if ($firstarray ge $secondarray)&lt;br /&gt;
// Compare if first is lower than second (case insensitive)&lt;br /&gt;
if ($firstarray lti $secondarray)&lt;br /&gt;
// Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray gti $secondarray)&lt;br /&gt;
// Compare if first is lower than or equal to second (case insensitive)&lt;br /&gt;
if ($firstarray lei $secondarray)&lt;br /&gt;
// Compare if first is greater than second (case insensitive)&lt;br /&gt;
if ($firstarray gei $secondarray)&lt;br /&gt;
// Compare if first is lower or greater than second&lt;br /&gt;
if ($firstarray lg $secondarray)&lt;br /&gt;
// Compare if first is lower or greater than second (case insensitive)&lt;br /&gt;
if ($firstarray lgi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T17:32:48Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Arrays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; ), 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T17:27:05Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Arrays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T17:26:38Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Arrays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will create the new keys (indexes) as you use them you will notice that index 4 to 98 are missing? This is because Sputnik arrays only create keys if they need to and will never fill in gaps for you.&lt;br /&gt;
&lt;br /&gt;
You can of course force it to fix the array indexes so it goes from 0 upwards properly like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a simple array with 4 elements&lt;br /&gt;
my $array = array(1, 2, 3, 4);&lt;br /&gt;
// Modify it&lt;br /&gt;
$array[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$array[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$array[99] = &amp;quot;hi there!&amp;quot;; &lt;br /&gt;
// Print the details of the array&lt;br /&gt;
order $array; // Smooth out the array&lt;br /&gt;
printr $array;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 1&lt;br /&gt;
//     [1] =&amp;gt; hmmm&lt;br /&gt;
//     [2] =&amp;gt; Hello&lt;br /&gt;
//     [3] =&amp;gt; 4&lt;br /&gt;
//     [4] =&amp;gt; hi there!&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T15:11:50Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Strings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will be automatically expanded to the size you request all the elements in the gap that it fills in will be empty strings ready for use (As seen in index 98).&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T14:33:05Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Characters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used as a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
To access the raw memory of a string and physically see its null terminator you must use the Fixed() statement or cast the string as a char* the same as in C here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello World!&amp;quot;;&lt;br /&gt;
// Create a pointer to the strings&lt;br /&gt;
// physical memory and place it in&lt;br /&gt;
// $p&lt;br /&gt;
fixed( $p = $str )&lt;br /&gt;
{&lt;br /&gt;
	// Loop through each character in the string&lt;br /&gt;
	// until the null terminator is hit then stop&lt;br /&gt;
	while( (my $c = (char)*$p++) != @'\0' )&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Character '%c' as decimal '%d' as hex '%x'\n&amp;quot;, $c, $c, $c);&lt;br /&gt;
	}&lt;br /&gt;
	// The fact that it actually stops is proof&lt;br /&gt;
	// the null terminator exists&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Character 'H' as decimal '72' as hex '48'&lt;br /&gt;
// Character 'e' as decimal '101' as hex '65'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character ' ' as decimal '32' as hex '20'&lt;br /&gt;
// Character 'W' as decimal '87' as hex '57'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character 'r' as decimal '114' as hex '72'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'd' as decimal '100' as hex '64'&lt;br /&gt;
// Character '!' as decimal '33' as hex '21'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will be automatically expanded to the size you request all the elements in the gap that it fills in will be empty strings ready for use (As seen in index 98).&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T14:30:35Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Numbers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used a a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
To access the raw memory of a string and physically see its null terminator you must use the Fixed() statement or cast the string as a char* the same as in C here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello World!&amp;quot;;&lt;br /&gt;
// Create a pointer to the strings&lt;br /&gt;
// physical memory and place it in&lt;br /&gt;
// $p&lt;br /&gt;
fixed( $p = $str )&lt;br /&gt;
{&lt;br /&gt;
	// Loop through each character in the string&lt;br /&gt;
	// until the null terminator is hit then stop&lt;br /&gt;
	while( (my $c = (char)*$p++) != @'\0' )&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Character '%c' as decimal '%d' as hex '%x'\n&amp;quot;, $c, $c, $c);&lt;br /&gt;
	}&lt;br /&gt;
	// The fact that it actually stops is proof&lt;br /&gt;
	// the null terminator exists&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Character 'H' as decimal '72' as hex '48'&lt;br /&gt;
// Character 'e' as decimal '101' as hex '65'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character ' ' as decimal '32' as hex '20'&lt;br /&gt;
// Character 'W' as decimal '87' as hex '57'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character 'r' as decimal '114' as hex '72'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'd' as decimal '100' as hex '64'&lt;br /&gt;
// Character '!' as decimal '33' as hex '21'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will be automatically expanded to the size you request all the elements in the gap that it fills in will be empty strings ready for use (As seen in index 98).&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-26T14:11:56Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Brief */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two SVs they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used a a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
To access the raw memory of a string and physically see its null terminator you must use the Fixed() statement or cast the string as a char* the same as in C here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello World!&amp;quot;;&lt;br /&gt;
// Create a pointer to the strings&lt;br /&gt;
// physical memory and place it in&lt;br /&gt;
// $p&lt;br /&gt;
fixed( $p = $str )&lt;br /&gt;
{&lt;br /&gt;
	// Loop through each character in the string&lt;br /&gt;
	// until the null terminator is hit then stop&lt;br /&gt;
	while( (my $c = (char)*$p++) != @'\0' )&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Character '%c' as decimal '%d' as hex '%x'\n&amp;quot;, $c, $c, $c);&lt;br /&gt;
	}&lt;br /&gt;
	// The fact that it actually stops is proof&lt;br /&gt;
	// the null terminator exists&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Character 'H' as decimal '72' as hex '48'&lt;br /&gt;
// Character 'e' as decimal '101' as hex '65'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character ' ' as decimal '32' as hex '20'&lt;br /&gt;
// Character 'W' as decimal '87' as hex '57'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character 'r' as decimal '114' as hex '72'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'd' as decimal '100' as hex '64'&lt;br /&gt;
// Character '!' as decimal '33' as hex '21'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will be automatically expanded to the size you request all the elements in the gap that it fills in will be empty strings ready for use (As seen in index 98).&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Function_Reference</id>
		<title>Function Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Function_Reference"/>
				<updated>2015-09-24T02:37:47Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik Plugins (Using .NET DLLs) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Function Reference ==&lt;br /&gt;
&lt;br /&gt;
=== How to create a Function ===&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Core Functions ===&lt;br /&gt;
&lt;br /&gt;
If a link is red (unclickable) the function either doesnt exist yet and is pending creation or it has been created but does not yet have a page/example.&lt;br /&gt;
&lt;br /&gt;
==== Language Features ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Translation|&amp;lt;Expression&amp;gt; =~ tr/searchList/replacementList/flags]] -- Translate characters from one character set to another similar to StrTr() function&lt;br /&gt;
* [[Core Function Regex Match|&amp;lt;Expression&amp;gt; =~ m/pattern/flags]] -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups&lt;br /&gt;
* [[Core Function Regex Replace|&amp;lt;Expression&amp;gt; =~ s/pattern/replacement/flags]] -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups&lt;br /&gt;
* [[Core Function Goto Label|Goto Label; &amp;amp; Label:]] -- Jump to another section of the script&lt;br /&gt;
* [[Core Function List|&amp;lt;Scope&amp;gt; List( &amp;lt;expressions&amp;gt;, .. ) = &amp;lt;array&amp;gt;]] -- Extract some elements from an array into ready to use variables&lt;br /&gt;
* [[Core Function Pointer Read/Write Bracket|$ptr[&amp;lt;index&amp;gt;]:&amp;lt;type&amp;gt; = &amp;lt;value&amp;gt;]] -- Read and Write to memory pointers similar to PTRRead() and PTRWrite() but using [] to simulate like it's an array&lt;br /&gt;
* [[Core Function Array Splicing|Array Splicing]] -- Copy parts out of an array and return them as a new array&lt;br /&gt;
* [[Core Function Function Variables|Function Variables]] -- Dynamically create function source code and place it in a variable and call it from the variable&lt;br /&gt;
&lt;br /&gt;
===== Parser Engine =====&lt;br /&gt;
* [[Core Function Parser Engine|Parser Engine]] -- Parse text and have classes created and returned to you&lt;br /&gt;
* [[Core Function Parser|Parser( &amp;lt;grammar&amp;gt;, &amp;lt;tokenName&amp;gt;, &amp;lt;trimRules&amp;gt; )]] -- Create a new parser&lt;br /&gt;
* [[Core Function Parse|Parse( &amp;lt;parser&amp;gt;, &amp;lt;text&amp;gt; )]] -- Parse text with a parser created with Parser()&lt;br /&gt;
* [[Core Function IsToken|IsToken( &amp;lt;object&amp;gt; )]] -- Check if a given object is a token created from the parser&lt;br /&gt;
* [[Core Function TokenClass|TokenClass( &amp;lt;token&amp;gt; )]] -- Get the class the token is linked to&lt;br /&gt;
&lt;br /&gt;
==== Console Functions ====&lt;br /&gt;
* [[Core Function Print|Echo( )]] -- Alias for [[Core Function Print|Print( )]]&lt;br /&gt;
* [[Core Function Println|Say( )]] -- Alias for [[Core Function Println|Println( )]]&lt;br /&gt;
* [[Core Function Print|Print( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window&lt;br /&gt;
* [[Core Function Println|Println( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window and inserts a newline character at the end.&lt;br /&gt;
* [[Core Function Printf|Printf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) &lt;br /&gt;
* [[Core Function VPrintf|VPrintf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) using an array as the parameters &lt;br /&gt;
* [[Core Function PrintfC|PrintfC( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Print a formatted string to the console window&lt;br /&gt;
* [[Core Function Input|Input( &amp;lt;prompt&amp;gt; )]] -- Capture a string typed to console window&lt;br /&gt;
* [[Core Function InputC|InputC( &amp;lt;prompt/flag&amp;gt; )]] -- Capture a char (or info about the char) typed to console window&lt;br /&gt;
* [[Core Function Pause|Pause( &amp;lt;expression&amp;gt; )]] -- Pause the execution of the script on the console window until any key is pressed&lt;br /&gt;
* [[Core Function ConsoleClear|Cls( )]] -- Alias for [[Core Function ConsoleClear|ConsoleClear( )]]&lt;br /&gt;
* [[Core Function ConsoleClear|ConsoleClear( )]] -- Clear all text from the console window&lt;br /&gt;
* [[Core Function ConsoleKeyAvailable|ConsoleKeyAvailable( )]] -- Check if there is a key ready to be read from the console &lt;br /&gt;
* [[Core Function ConsoleCapsLock|ConsoleCapsLock( )]] -- Check if caps lock is down on the console &lt;br /&gt;
* [[Core Function ConsoleSetCursor|ConsoleSetCursor( &amp;lt;posX&amp;gt;, &amp;lt;posY&amp;gt; )]] -- Set the cursor position on the console&lt;br /&gt;
* [[Core Function ConsoleSetBuffer|ConsoleSetBuffer( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console text buffer size&lt;br /&gt;
* [[Core Function ConsoleSetSize|ConsoleSetSize( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console window size&lt;br /&gt;
* [[Core Function ConsoleHide|ConsoleHide( )]] -- Hide the console window&lt;br /&gt;
* [[Core Function ConsoleShow|ConsoleShow( )]] -- Show the console window&lt;br /&gt;
* [[Core Function ConsoleState|ConsoleState( )]] -- Get the console state (Visible, Hidden)&lt;br /&gt;
* [[Core Function ConsoleBeep|ConsoleBeep( &amp;lt;freq&amp;gt;, &amp;lt;duration&amp;gt; )]] -- Plays the sound of a beep of a specified frequency and duration through the console speaker&lt;br /&gt;
* [[Core Function ConsoleSeek|ConsoleSeek( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Set the position of the console cursor&lt;br /&gt;
* [[Core Function ConsoleBackColour|ConsoleBackColour( &amp;lt;colour&amp;gt; )]] -- Set the background (behind text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleForeColour|ConsoleForeColour( &amp;lt;colour&amp;gt; )]] -- Set the foreground (text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleBufferWidth|ConsoleBufferWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer width of the console window&lt;br /&gt;
* [[Core Function ConsoleBufferHeight|ConsoleBufferHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer height of the console window&lt;br /&gt;
* [[Core Function ConsoleWidth|ConsoleWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the width of the console window&lt;br /&gt;
* [[Core Function ConsoleHeight|ConsoleHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the height of the console window&lt;br /&gt;
* [[Core Function ConsoleTitle|ConsoleTitle( &amp;lt;newtitle&amp;gt; )]] -- Get or Set the title of the console window&lt;br /&gt;
* [[Core Function ConsoleCursorLeft|ConsoleCursorLeft( &amp;lt;newval&amp;gt; )]] -- Gets or sets the column position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorTop|ConsoleCursorTop( &amp;lt;newval&amp;gt; )]] -- Gets or sets the row position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorSize|ConsoleCursorSize( &amp;lt;newval&amp;gt; )]] -- Gets or sets the height of the cursor within a character cell&lt;br /&gt;
* [[Core Function ConsoleCursorVisible|ConsoleCursorVisible( &amp;lt;newval&amp;gt; )]] -- Gets or sets a value indicating whether the cursor is visible&lt;br /&gt;
* [[Core Function CGIConsole|CGIConsole( )]] -- Changes the console printing to work best a CGI instead of stand alone terminal&lt;br /&gt;
&lt;br /&gt;
==== Multi-Threading Functions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ThreadCreate|ThreadCreate( &amp;lt;name&amp;gt;, &amp;lt;function&amp;gt;, &amp;lt;extra&amp;gt; )]] -- Create a new thread and start it off executing a function or some code&lt;br /&gt;
* [[Core Function ThreadSleep|ThreadSleep( &amp;lt;name&amp;gt; )]] -- Freeze a thread and make it sleep&lt;br /&gt;
* [[Core Function ThreadResume|ThreadResume( &amp;lt;name&amp;gt; )]] -- Unfreeze a thread and allow it to continue execution&lt;br /&gt;
* [[Core Function ThreadState|ThreadState( &amp;lt;name&amp;gt; )]] -- Returns state of a thread&lt;br /&gt;
* [[Core Function ThreadKill|ThreadKill( &amp;lt;name&amp;gt; )]] -- Terminate a thread and remove it from the script&lt;br /&gt;
* [[Core Function ThreadExists|ThreadExists( &amp;lt;name&amp;gt; )]] -- Check if a thread exists by this name&lt;br /&gt;
* [[Core Function ThreadName|ThreadName( )]] -- Returns the name of the current thread that is executing this code&lt;br /&gt;
* [[Core Function ThreadLock|ThreadLock( &amp;lt;lockname&amp;gt; ) {}]] -- Locks a given section of code allowing only one thread to execute it at a time&lt;br /&gt;
* [[Core Function Threads|Threads( )]] -- Return an array of all threads&lt;br /&gt;
&lt;br /&gt;
==== Variable Type Conversions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Bool|Bool( &amp;lt;expression&amp;gt; )]] -- Returns the TRUE(1) or FALSE(0) representation of an expression&lt;br /&gt;
* [[Core Function Char|Char( &amp;lt;expression&amp;gt; )]] -- Returns the single letter representation of an expression&lt;br /&gt;
* [[Core Function Byte|Byte( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function SByte|SByte( &amp;lt;expression&amp;gt; )]] -- Returns the signed 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Short|Short( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int16|Int16( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int32|Int32( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int|Int( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int64|Int64( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Long|Long( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UShort|UShort( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt16|UInt16( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt32|UInt32( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt|UInt( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt64|UInt64( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function ULong|ULong( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Ptr|Ptr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function IntPtr|IntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function UPtr|UPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function UIntPtr|UIntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function Float|Float( &amp;lt;expression&amp;gt; )]] -- Returns the 32-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function Double|Double( &amp;lt;expression&amp;gt; )]] -- Returns the 64-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function String|String( &amp;lt;expression&amp;gt; )]] -- Returns the String representation of an expression&lt;br /&gt;
* [[Core Function Ascii|Ascii( &amp;lt;expression&amp;gt; )]] -- Returns the String (In raw ASCII) representation of an expression&lt;br /&gt;
* [[Core Function Binary|Binary( &amp;lt;expression&amp;gt; )]] -- Returns the Binary (raw bytes) representation of an expression&lt;br /&gt;
&lt;br /&gt;
==== Common Variable Functions ====&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function IsSet|IsSet( $variable )]] -- Determine if a variable is set and is not NULL&lt;br /&gt;
* [[Core Function Unset|Unset( $variable )]] -- Delete a variable&lt;br /&gt;
* [[Core Function Ref|Ref( $variable )]] -- Retrieve the variable at the lowest depth in references that the current variable links to&lt;br /&gt;
* [[Core Function IsDeclared|IsDeclared( &amp;lt;variable name&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a variable has been declared&lt;br /&gt;
* [[Core Function Printr|Printr( $variable, &amp;lt;newline&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Prints all details about a variable in a way thats easy for humans to read it (Will print arrays etc)&lt;br /&gt;
* [[Core Function VarDump|VarDump( $variable, &amp;lt;newline&amp;gt; )]] -- Dumps information about a variable&lt;br /&gt;
* [[Core Function Assign|Assign( &amp;lt;varname&amp;gt;, &amp;lt;data&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Assigns a variable by name with the data&lt;br /&gt;
* [[Core Function Atof|Atof( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Double&lt;br /&gt;
* [[Core Function Atoi|Atoi( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int32&lt;br /&gt;
* [[Core Function Atol|Atol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToTol|StrTol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToToul|StrToul( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to UInt64&lt;br /&gt;
* [[Core Function IsNan|IsNan( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is NaN (Not a number)&lt;br /&gt;
* [[Core Function IsInf|IsInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Infinity&lt;br /&gt;
* [[Core Function IsPosInf|IsPosInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Positive-Infinity&lt;br /&gt;
* [[Core Function IsNegInf|IsNegInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Negative-Infinity&lt;br /&gt;
* [[Core Function IsNormal|IsNormal( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is neither NaN, PosInf, NegInf or Inf&lt;br /&gt;
* [[Core Function SignBit|SignBit( &amp;lt;variable&amp;gt; )]] -- Returns whether the sign of a variable is negative&lt;br /&gt;
&lt;br /&gt;
===== Type Checking =====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function isVar|isVar( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Checks if a variable is a type (as a string) or inherits from a type (if not strict) (the same as $a ~~ Type)&lt;br /&gt;
* [[Core Function isVarChar|isVarChar( $variable )]] -- Checks if a variable is a char type&lt;br /&gt;
* [[Core Function isVarBool|isVarBool( $variable )]] -- Checks if a variable is a boolean type&lt;br /&gt;
* [[Core Function isVarByte|isVarByte( $variable )]] -- Checks if a variable is an unsigned 8-bit integer type&lt;br /&gt;
* [[Core Function isVarSByte|isVarSByte( $variable )]] -- Checks if a variable is a signed 8-bit integer type&lt;br /&gt;
* [[Core Function isVarShort|isVarShort( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt16|isVarInt16( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt|isVarInt( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt32|isVarInt32( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt64|isVarInt64( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarLong|isVarLong( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarUShort|isVarUShort( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt16|isVarUInt16( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt|isVarUInt( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt32|isVarUInt32( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt64|isVarUInt64( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarULong|isVarULong( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarFloat|isVarFloat( $variable )]] -- Checks if a variable is a single precision floating point type&lt;br /&gt;
* [[Core Function isVarFP|isVarFP( $variable )]] -- Checks if a check if a variable type is only a float/double nothing else&lt;br /&gt;
* [[Core Function isVarDouble|isVarDouble( $variable )]] -- Checks if a variable is a double precision floating point type&lt;br /&gt;
* [[Core Function isVarPtr|isVarPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarIntPtr|isVarIntPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarUPtr|isVarUPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarUIntPtr|isVarUIntPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarString|isVarString( $variable )]] -- Checks if a variable is a string type&lt;br /&gt;
* [[Core Function isVarNumber|isVarNumber( $variable )]] -- Checks if a variable is any integer or float/double type&lt;br /&gt;
* [[Core Function isVarNull|isVarNull( $variable )]] -- Checks if a variable is null&lt;br /&gt;
* [[Core Function isVarBinary|isVarBinary( $variable )]] -- Checks if a variable is a binary type&lt;br /&gt;
* [[Core Function isVarFunction|isVarFunction( $variable )]] -- Checks if a variable is a function type&lt;br /&gt;
* [[Core Function isVarRef|isVarRef( $variable )]] -- Check if a variable is an reference to another variable&lt;br /&gt;
* [[Core Function isVarArray|isVarArray( $variable )]] -- Check if a variable is an array&lt;br /&gt;
* [[Core Function isVarObj|isVarObj( $variable, &amp;lt;type&amp;gt; )]] -- Check if a variable is an object type (This includes classes, file handles etc)&lt;br /&gt;
* [[Core Function isVarClass|isVarClass( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Check if a variable's object type is a class&lt;br /&gt;
* [[Core Function isVarDLLStruct|isVarDLLStruct( $variable )]] -- Check if a variable holds a DLLStruct&lt;br /&gt;
* [[Core Function isVarServer|isVarServer( $variable )]] -- Check if a variable holds a Server object from Listen()&lt;br /&gt;
* [[Core Function isVarClient|isVarClient( $variable )]] -- Check if a variable holds a Client object from Connect()&lt;br /&gt;
* [[Core Function isVarClientSocket|isVarClientSocket( $variable )]] -- Check if a variable holds a Client socket object&lt;br /&gt;
* [[Core Function isVarSocket|isVarSocket( $variable )]] -- Check if a variable holds a Socket object&lt;br /&gt;
* [[Core Function isVarSigned|isVarSigned( $variable )]] -- Check if a variable holds a signed integer&lt;br /&gt;
* [[Core Function isVarUnsigned|isVarUnsigned( $variable )]] -- Check if a variable holds an unsigned integer&lt;br /&gt;
&lt;br /&gt;
====== Get Type Directly ======&lt;br /&gt;
* [[Core Function GetVarType|GetVarType( $variable )]] -- Get the common type of a variable&lt;br /&gt;
* [[Core Function GetVarTypeName|GetVarTypeName( $variable )]] -- Get the common type of a variable (as a string)&lt;br /&gt;
* [[Core Function GetVarObjType|GetVarObjType( $variable )]] -- Get the common object type of a variable (If it is an object)&lt;br /&gt;
* [[Core Function GetVarObjTypeName|GetVarObjTypeName( $variable )]] -- Get the common object type of a variable (If it is an object) and return it as string&lt;br /&gt;
&lt;br /&gt;
==== Binary Data Management Functions ====&lt;br /&gt;
* [[Core Function Bin|Bin( &amp;lt;args&amp;gt; )]] -- Create a new binary variable&lt;br /&gt;
* [[Core Function Op|Op( &amp;lt;opCodes&amp;gt; )]] -- Create a new binary variable from a string of opCodes such as &amp;quot;AA 10 20&amp;quot;&lt;br /&gt;
* [[Core Function BinaryCreate|BinaryCreate( &amp;lt;size&amp;gt;, &amp;lt;fill&amp;gt; )]] -- Create a new binary variable and its array size and fill data type &lt;br /&gt;
* [[Core Function BinaryClone|BinaryClone( &amp;lt;binary-array&amp;gt; )]] -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one&lt;br /&gt;
* [[Core Function BinaryContains|BinaryContains( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* [[Core Function BinaryCRC32|BinaryCRC32( &amp;lt;binary-array&amp;gt; )]] -- Calculates the crc32 polynomial of a binary array&lt;br /&gt;
* [[Core Function BinaryWipe|BinaryWipe( &amp;lt;binary-array&amp;gt; )]] -- Wipes a binary variables data 100% and sets the variable to a blank int containing null&lt;br /&gt;
* [[Core Function BinaryFill|BinaryFill( &amp;lt;binary-array&amp;gt;, &amp;lt;fillWith&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Fill a binary variables data (replace all of it or part of it) with a given byte or zero&lt;br /&gt;
* [[Core Function BinaryStr|BinaryStr( &amp;lt;binary-array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Create a Hex string from a binary array&lt;br /&gt;
* [[Core Function BinaryHex|BinaryHex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a binary array from a hex string&lt;br /&gt;
* [[Core Function BinaryLen|BinaryLen( &amp;lt;binary-array&amp;gt;, &amp;lt;newLen&amp;gt; )]] -- Returns the number of bytes in a binary variable (or increase it's capacity for bytes)&lt;br /&gt;
* [[Core Function BinaryGet|BinaryGet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinarySet|BinarySet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinaryReverse|BinaryReverse( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Reverse the order bytes a binary variable&lt;br /&gt;
* [[Core Function BinaryRemove|BinaryRemove( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Remove bytes from a binary variable&lt;br /&gt;
* [[Core Function BinaryExpand|BinaryExpand( &amp;lt;binary-array&amp;gt; )]] -- Expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable&lt;br /&gt;
* [[Core Function BinaryStartsWith|BinaryStartsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable starts with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryEndsWith|BinaryEndsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable ends with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryIndexOf|BinaryIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryIndexOfAny|BinaryIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryLastIndexOf|BinaryLastIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryLastIndexOfAny|BinaryLastIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryRandom|BinaryRandom( &amp;lt;binary-array&amp;gt;, &amp;lt;seed&amp;gt; )]] -- Randomize all bytes in a binary variable&lt;br /&gt;
* [[Core Function BinaryReplace|BinaryReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;maxReplacements&amp;gt; )]] -- Search for a byte or string of bytes in a binary variable and replace it&lt;br /&gt;
* [[Core Function BinaryHash|BinaryHash( &amp;lt;binary-array&amp;gt; )]] -- Gain a unique Hash of the bytes in this binary variable&lt;br /&gt;
* [[Core Function BinaryMid|BinaryMid( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Create a binary variable by extracting a number of bytes from another binary variable&lt;br /&gt;
* [[Core Function BinaryMidReplace|BinaryMidReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace a section (from start to length) of the binary with the replacement binary&lt;br /&gt;
* [[Core Function BinaryConcat|BinaryConcat( &amp;lt;destination/array&amp;gt;, &amp;lt;values&amp;gt; )]] -- Mass append a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryJoin|BinaryJoin( &amp;lt;separator&amp;gt;, &amp;lt;values&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] -- Create a new Binary by joining together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryAppend|BinaryAppend( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Append a binary variables data onto the end or beginning of another binary variables data&lt;br /&gt;
* [[Core Function BinaryInsert|BinaryInsert( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;overwrite&amp;gt; )]] -- Insert a binary variables data into another binary variable at a specific location&lt;br /&gt;
* [[Core Function BinaryUnshift|BinaryUnshift( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the beginning of a binary variable&lt;br /&gt;
* [[Core Function BinaryPush|BinaryPush( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the end of a binary variable&lt;br /&gt;
* [[Core Function BinaryShift|BinaryShift( &amp;lt;binary-array&amp;gt; )]] -- Delete the first byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryPop|BinaryPop( &amp;lt;binary-array&amp;gt; )]] -- Delete the last byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryResize|BinaryResize( &amp;lt;binary-array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;data&amp;gt; )]] -- Resize a binary variables data array&lt;br /&gt;
* [[Core Function BinaryPadLeft|BinaryPadLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Left pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinaryPadRight|BinaryPadRight( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Right pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinarySHA1|BinarySHA1( &amp;lt;binary-array&amp;gt; )]] -- Returns the SHA1 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryFromStr|BinaryFromStr( &amp;lt;string&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new binary variable created from a strings raw bytes&lt;br /&gt;
* [[Core Function BinaryToStr|BinaryToStr( &amp;lt;binary-array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a new string containing the binary data as raw bytes&lt;br /&gt;
* [[Core Function BinaryMD5|BinaryMD5( &amp;lt;binary-array&amp;gt; )]] -- Returns the MD5 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryCompare|BinaryCompare( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;needle, &amp;lt;needleOffset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Compare two binary variables&lt;br /&gt;
* [[Core Function BinaryCompress|BinaryCompress( &amp;lt;binary-array&amp;gt; )]] -- Compress a binary variables data&lt;br /&gt;
* [[Core Function BinaryUncompress|BinaryUncompress( &amp;lt;binary-array&amp;gt; )]] -- Uncompress a binary variable data&lt;br /&gt;
* [[Core Function BinaryToLower|BinaryToLower( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to lowercase&lt;br /&gt;
* [[Core Function BinaryToUpper|BinaryToUpper( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to uppercase&lt;br /&gt;
* [[Core Function BinaryTrim|BinaryTrim( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left or right&lt;br /&gt;
* [[Core Function BinaryTrimLeft|BinaryTrimLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left&lt;br /&gt;
* [[Core Function BinaryTrimRight|BinaryTrimRight( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the right&lt;br /&gt;
* [[Core Function BinaryStripNull|BinaryStripNull( &amp;lt;binary-array&amp;gt; )]] -- Strip all NULL bytes (0x00) from a binary variable&lt;br /&gt;
* [[Core Function BinaryUUEncode|BinaryUUEncode( &amp;lt;binary-array&amp;gt; )]] -- Encodes a binary variable using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinaryUUDecode|BinaryUUDecode( &amp;lt;binary-array&amp;gt; )]] -- Decodes a binary variable that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinarySave|BinarySave( &amp;lt;binary-array&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Save a binary variable data to file&lt;br /&gt;
* [[Core Function BinaryLoad|BinaryLoad( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new binary variable by loading binary data from a file&lt;br /&gt;
&lt;br /&gt;
===== Binary packer/unpacker =====&lt;br /&gt;
* [[Core Function Pack|Pack( &amp;lt;format&amp;gt;, &amp;lt;args&amp;gt; )]] -- Pack data into a binary array&lt;br /&gt;
* [[Core Function Unpack|Unpack( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Unpack data from a binary array&lt;br /&gt;
* [[Core Function PackSingle|PackSingle( &amp;lt;format&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pack a single value into a binary array&lt;br /&gt;
* [[Core Function UnpackSingle|UnpackSingle( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;position&amp;gt; )]] -- Unpack a single value from a binary array optionally from a given index&lt;br /&gt;
&lt;br /&gt;
===== Bit Vector =====&lt;br /&gt;
* [[Core Function Vec|Vec( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;bits&amp;gt; )]] -- Treats binary variable as a bit vector made up of elements of width bits and returns the value of the element specified by offset as an unsigned integer and optionally sets bits in the string to a given value&lt;br /&gt;
&lt;br /&gt;
===== Bits =====&lt;br /&gt;
* [[Core Function SetBit|SetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the bit at a given index&lt;br /&gt;
* [[Core Function GetBit|GetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the bit at a given index&lt;br /&gt;
* [[Core Function InvertBit|InvertBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Invert the bit at a given index&lt;br /&gt;
* [[Core Function ClearBit|ClearBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Clear the bit at a given index&lt;br /&gt;
* [[Core Function FillBit|FillBit( &amp;lt;binary-array&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set all bits to the value&lt;br /&gt;
&lt;br /&gt;
===== BinHex 5.0 =====&lt;br /&gt;
* [[Core Function BinHexEncode|BinHexEncode( &amp;lt;name&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;creator&amp;gt;, &amp;lt;resourceFork&amp;gt;, &amp;lt;dataFork&amp;gt;, &amp;lt;flag1&amp;gt;, &amp;lt;flag2&amp;gt; )]] -- Encode data (usually a file) to BinHex 5.0 format&lt;br /&gt;
* [[Core Function BinHexDecode|BinHexDecode( &amp;lt;binhex-binary&amp;gt; )]] -- Decode data (usually a file) from BinHex 5.0 format&lt;br /&gt;
&lt;br /&gt;
===== ByteBuffer =====&lt;br /&gt;
The ByteBuffer is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc it works similar to the ByteBuffer in Java&lt;br /&gt;
* [[Core Function ByteBufferNew|ByteBufferNew( &amp;lt;nothing/capacity/binary/byteBuffer&amp;gt; )]] -- Make a new ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferGet|ByteBufferGet( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get data from a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPut|ByteBufferPut( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;variable&amp;gt; )]] -- Add data to a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPeek|ByteBufferPeek( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt; )]] -- Peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* [[Core Function ByteBufferGetBinary|ByteBufferGetBinary( &amp;lt;byteBuffer&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt; )]] -- Get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* [[Core Function ByteBufferCapacity|ByteBufferCapacity( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferRewind|ByteBufferRewind( &amp;lt;byteBuffer&amp;gt; )]] -- Set the position of a ByteBuffer back to the start&lt;br /&gt;
* [[Core Function ByteBufferLimit|ByteBufferLimit( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPosition|ByteBufferPosition( &amp;lt;byteBuffer&amp;gt;, &amp;lt;newPosition&amp;gt; )]] -- Get and set the position of a ByteBuffer to any value&lt;br /&gt;
* [[Core Function ByteBufferRemaining|ByteBufferRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferHasRemaining|ByteBufferHasRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferClear|ByteBufferClear( &amp;lt;byteBuffer&amp;gt; )]] -- Clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferFlip|ByteBufferFlip( &amp;lt;byteBuffer&amp;gt; )]] -- Flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferMark|ByteBufferMark( &amp;lt;byteBuffer&amp;gt; )]] -- Mark the position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferReset|ByteBufferReset( &amp;lt;byteBuffer&amp;gt; )]] -- Reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferCompare|ByteBufferCompare( &amp;lt;byteBuffer&amp;gt;, &amp;lt;byteBuffer&amp;gt; )]] -- Compare two ByteBuffers to see if they are equal&lt;br /&gt;
* [[Core Function ByteBufferClone|ByteBufferClone( &amp;lt;byteBuffer&amp;gt; )]] -- Clone a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferToBinary|ByteBufferToBinary( &amp;lt;byteBuffer&amp;gt; )]] -- Return a new binary variable from the data contained within the ByteBuffer&lt;br /&gt;
&lt;br /&gt;
===== NBT (Named Binary Tag) =====&lt;br /&gt;
Functions on par with Minecrafts NBT system but greatly expanded to include many additional features and improvements specific for Sputnik.&lt;br /&gt;
* [[Core Function NBT|NBT( &amp;lt;value&amp;gt; )]] -- Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* [[Core Function NBTNew|NBTNew( &amp;lt;nbt-type&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* [[Core Function NBTCompare|NBTCompare( &amp;lt;nbt&amp;gt;, &amp;lt;nbt&amp;gt; )]] -- Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* [[Core Function NBTCopy|NBTCopy( &amp;lt;nbt&amp;gt; )]] -- Make a clone of an NBT&lt;br /&gt;
* [[Core Function NBTGetId|NBTGetId( &amp;lt;nbt&amp;gt; )]] -- Get the ID type of an NBT&lt;br /&gt;
* [[Core Function NBTGetName|NBTGetName( &amp;lt;nbt&amp;gt; )]] -- Get the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTSetName|NBTGetName( &amp;lt;nbt&amp;gt;, &amp;lt;new-name&amp;gt; )]] -- Set the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTHash|NBTHash( &amp;lt;nbt&amp;gt; )]] -- Compute the CRC32 hash of an NBT&lt;br /&gt;
* [[Core Function NBTToString|NBTToString( &amp;lt;nbt&amp;gt; )]] -- Return a string representation of an NBT&lt;br /&gt;
* [[Core Function NBTToVar|NBTToVar( &amp;lt;nbt&amp;gt; )]] -- Return the Sputnik variable representation of an NBT&lt;br /&gt;
* [[Core Function IsVarNBT|IsVarNBT( &amp;lt;value&amp;gt; )]] -- Check if a variable is contains an NBT&lt;br /&gt;
&lt;br /&gt;
====== NBTTagCompound ======&lt;br /&gt;
* [[Core Function NBTCompoundClear|NBTCompoundClear( &amp;lt;nbtCompound&amp;gt; )]] -- Clear all tags&lt;br /&gt;
* [[Core Function NBTCompoundCount|NBTCompoundCount( &amp;lt;nbtCompound&amp;gt; )]] -- Return the amount of tags&lt;br /&gt;
* [[Core Function NBTCompoundGet|NBTCompoundGet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Get a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundSet|NBTCompoundSet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundGetKeys|NBTCompoundGetKeys( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all keys&lt;br /&gt;
* [[Core Function NBTCompoundGetTags|NBTCompoundGetTags( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all tags&lt;br /&gt;
* [[Core Function NBTCompoundGetMap|NBTCompoundGetMap( &amp;lt;nbtCompound&amp;gt; )]] -- Get an associative array of all keys and tags&lt;br /&gt;
* [[Core Function NBTCompoundHasKey|NBTCompoundHasKey( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Check if a given tag exists by name&lt;br /&gt;
* [[Core Function NBTCompoundIsEmpty|NBTCompoundIsEmpty( &amp;lt;nbtCompound&amp;gt; )]] -- Check if there are no tags&lt;br /&gt;
* [[Core Function NBTCompoundRemove|NBTCompoundRemove( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Remove a specific tag by name&lt;br /&gt;
* [[Core Function NBTCompoundWrite|NBTCompoundWrite( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundRead|NBTCompoundRead( &amp;lt;binary-variable/buffer&amp;gt; )]] -- Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundWriteFile|NBTCompoundWriteFile( &amp;lt;nbtCompound&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;compression )]] -- Write the NBTTagCompound to a file&lt;br /&gt;
* [[Core Function NBTCompoundReadFile|NBTCompoundReadFile( &amp;lt;file&amp;gt; )]] -- Create a new NBTTagCompound from reading a file&lt;br /&gt;
* [[Core Function NBTCompoundCompress|NBTCompoundCompress( &amp;lt;nbtCompound&amp;gt; )]] -- Compress the NBTTagCompound to binary&lt;br /&gt;
* [[Core Function NBTCompoundDecompress|NBTCompoundDecompress( &amp;lt;binary-variable&amp;gt; )]] -- Decompress a NBTTagCompound from binary&lt;br /&gt;
* [[Core Function NBTCompoundWriteCompressed|NBTCompoundWriteCompressed( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* [[Core Function NBTCompoundReadCompressed|NBTCompoundReadCompressed( &amp;lt;buffer&amp;gt; )]] -- Decompress a NBTTagCompound from a buffer&lt;br /&gt;
&lt;br /&gt;
====== NBTTagList/NBTTagListEx ======&lt;br /&gt;
* [[Core Function NBTListAppend|NBTListAppend( &amp;lt;nbtList&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add an NBT to the end of the list&lt;br /&gt;
* [[Core Function NBTListCount|NBTListCount( &amp;lt;nbtList&amp;gt; )]] -- Return how many tags exist in the list&lt;br /&gt;
* [[Core Function NBTListGet|NBTListGet( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get a tag at the given index&lt;br /&gt;
* [[Core Function NBTListHasId|NBTListHasId( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an index is valid and contains a tag&lt;br /&gt;
* [[Core Function NBTListRemove|NBTListRemove( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
===== Misc Binary Functions =====&lt;br /&gt;
* [[Core Function TB|TB( &amp;lt;string&amp;gt; )]] -- Convert a string of up to 4 chars into a 32-Bit unsigned number (network order)&lt;br /&gt;
* [[Core Function BT|BT( &amp;lt;number&amp;gt; )]] -- Convert a 32-Bit unsigned number (network order) into a string&lt;br /&gt;
&lt;br /&gt;
==== Bit Flag Functions ====&lt;br /&gt;
* [[Core Function HasFlag|HasFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt; )]] -- Check if a flag (or array of flags) is enabled in a given enum instance&lt;br /&gt;
* [[Core Function HasFlagAny|HasFlagAny( &amp;lt;enumInst&amp;gt;, &amp;lt;flags&amp;gt;... )]] -- Check if any flag is enabled in a given enum instance&lt;br /&gt;
* [[Core Function SetFlag|SetFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt;, &amp;lt;state&amp;gt; )]] -- Enable or Disable a flag (or array of flags) in a given enum instance&lt;br /&gt;
&lt;br /&gt;
==== Math Functions ====&lt;br /&gt;
* [[Core Function Abs|Abs( &amp;lt;expression&amp;gt; )]] -- Calculates the absolute value of a number&lt;br /&gt;
* [[Core Function ACos|ACos( &amp;lt;expression&amp;gt; )]] -- Calculates the arcCosine of a number&lt;br /&gt;
* [[Core Function ASin|ASin( &amp;lt;expression&amp;gt; )]] -- Calculates the arcsine of a number&lt;br /&gt;
* [[Core Function ATan|ATan( &amp;lt;expression&amp;gt; )]] -- Calculates the arctangent of a number&lt;br /&gt;
* [[Core Function ATan2|ATan2( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Compute arc tangent with two parameters&lt;br /&gt;
* [[Core Function Angle2D|Angle2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Calculates the angle of a line defined by two points on a 2D surface&lt;br /&gt;
* [[Core Function Barycentric|Barycentric( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;amount1&amp;gt;, &amp;lt;amount2&amp;gt; )]] -- Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates&lt;br /&gt;
* [[Core Function CatmullRom|CatmullRom( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;value4&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Catmull-Rom interpolation using the specified positions&lt;br /&gt;
* [[Core Function BaseConv|BaseConv( &amp;lt;number&amp;gt;, &amp;lt;frombase&amp;gt;, &amp;lt;tobase&amp;gt; )]] -- Convert a number between arbitrary bases&lt;br /&gt;
* [[Core Function BitAND|BitAND( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise AND operation&lt;br /&gt;
* [[Core Function BitNOT|BitNOT( &amp;lt;expression&amp;gt; )]] -- Performs a bitwise NOT operation&lt;br /&gt;
* [[Core Function BitOR|BitOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise OR operation&lt;br /&gt;
* [[Core Function BitSHIFT|BitSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a bit shifting operation&lt;br /&gt;
* [[Core Function BitTripleSHIFT|BitTripleSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a triple bit shifting operation&lt;br /&gt;
* [[Core Function BitXOR|BitXOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise exclusive OR (XOR) operation&lt;br /&gt;
* [[Core Function BitROTATE|BitROTATE( &amp;lt;expression&amp;gt;, &amp;lt;shift&amp;gt;, &amp;lt;size&amp;gt; )]] -- Performs a bit shifting operation, with rotation&lt;br /&gt;
* [[Core Function BitSwap|BitSwap( &amp;lt;expression&amp;gt; )]] -- Byte-swap (little-endian &amp;lt;-&amp;gt; big-endian)&lt;br /&gt;
* [[Core Function Ceiling|Ceiling( &amp;lt;expression&amp;gt; )]] -- Returns a number rounded up to the next integer&lt;br /&gt;
* [[Core Function Clamp|Clamp( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Clamps the specified value&lt;br /&gt;
* [[Core Function Cos|Cos( &amp;lt;expression&amp;gt; )]] -- Calculates the cosine of a number&lt;br /&gt;
* [[Core Function Cosh|Cosh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic cosine of the specified angle&lt;br /&gt;
* [[Core Function DegreesToRadians|DegreesToRadians( &amp;lt;value&amp;gt; )]] -- Converts degrees to radians&lt;br /&gt;
* [[Core Function DegreesToRevolutions|DegreesToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts degrees to revolutions&lt;br /&gt;
* [[Core Function DiffCalc|DiffCalc( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;isDouble&amp;gt; )]] -- Calculates the difference between two values and returns information about it that can help you convert the first into the second for future needs&lt;br /&gt;
* [[Core Function Distance|Distance( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt; )]] -- Calculates the absolute value of the difference of two values&lt;br /&gt;
* [[Core Function Distance2D|Distance2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Finds the distance between two points on a 2D surface&lt;br /&gt;
* [[Core Function Distance3D|Distance3D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;z1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;z2&amp;gt; )]] -- Finds the distance between two points on a 3D surface&lt;br /&gt;
* [[Core Function Exp|Exp( &amp;lt;expression&amp;gt; )]] -- Returns e raised to the specified power&lt;br /&gt;
* [[Core Function Floor|Floor( &amp;lt;expression&amp;gt; )]] -- Returns the largest integer less than or equal to the specified number&lt;br /&gt;
* [[Core Function frexp|frexp( &amp;lt;x&amp;gt; )]] -- Returns m and e such that x = m2e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero)&lt;br /&gt;
* [[Core Function Gauss|Gauss( &amp;lt;amplitude&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;radX&amp;gt;, &amp;lt;radY&amp;gt;, &amp;lt;sigmaX&amp;gt;, &amp;lt;sigmaY&amp;gt; )]] -- Get the result of the Gaussian function&lt;br /&gt;
* [[Core Function GradiansToRevolutions|GradiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts gradians to revolutions&lt;br /&gt;
* [[Core Function GradiansToDegrees|GradiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts gradians to degrees&lt;br /&gt;
* [[Core Function GradiansToRadians|GradiansToRadians( &amp;lt;value&amp;gt; )]] -- Converts gradians to radians&lt;br /&gt;
* [[Core Function Hermite|Hermite( &amp;lt;value1&amp;gt;, &amp;lt;tangent1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;tangent2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Hermite spline interpolation&lt;br /&gt;
* [[Core Function IsDivisible|IsDivisible( &amp;lt;expression&amp;gt;, &amp;lt;divisor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* [[Core Function IsOdd|IsOdd( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an odd number&lt;br /&gt;
* [[Core Function IsEven|IsEven( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an even number&lt;br /&gt;
* [[Core Function IntToRom|IntToRom( &amp;lt;expression&amp;gt; )]] -- Returns the roman numerical value of an integer&lt;br /&gt;
* [[Core Function ldexp|ldexp( &amp;lt;m&amp;gt;, &amp;lt;n&amp;gt; )]] -- Returns the value of m * 2^n&lt;br /&gt;
* [[Core Function Lerp|Lerp( &amp;lt;from&amp;gt;, &amp;lt;to&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a linear function by a given amount&lt;br /&gt;
* [[Core Function Log|Log( &amp;lt;expression&amp;gt;, &amp;lt;newbase&amp;gt; )]] -- Returns the logarithm of a specified number&lt;br /&gt;
* [[Core Function Log10|Log10( &amp;lt;expression&amp;gt; )]] -- Returns the common (base-10) logarithm of a specified number&lt;br /&gt;
* [[Core Function Math|Math( &amp;lt;expression&amp;gt; )]] -- Parse a string containing mathematical equations&lt;br /&gt;
* [[Core Function Max|Max( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the greater number and return it&lt;br /&gt;
* [[Core Function Min|Min( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the lesser number and return it&lt;br /&gt;
* [[Core Function Mod|Mod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the modulus operation&lt;br /&gt;
* [[Core Function Modf|Modf( &amp;lt;x&amp;gt;, &amp;lt;intpart&amp;gt; )]] -- Breaks x into an integral and a fractional part&lt;br /&gt;
* [[Core Function Mod2PI|Mod2PI( &amp;lt;value&amp;gt; )]] -- Calculates the modulo 2*PI of the specified value&lt;br /&gt;
* [[Core Function MatlabMod|MatlabMod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the Matlab modulus operation&lt;br /&gt;
* [[Core Function OffsetCalc|OffsetCalc( &amp;lt;size&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Calculate the START and LENGTH of an array index&lt;br /&gt;
* [[Core Function Pow|Pow( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Returns a specified number raised to the specified power&lt;br /&gt;
* [[Core Function RadiansToDegrees|RadiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts radians to degrees&lt;br /&gt;
* [[Core Function RadiansToRevolutions|RadiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts radians to revolutions&lt;br /&gt;
* [[Core Function RadiansToGradians|RadiansToGradians( &amp;lt;value&amp;gt; )]] -- Converts radians to gradians&lt;br /&gt;
* [[Core Function Random|Random( &amp;lt;minValue&amp;gt;, &amp;lt;maxValue&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get a random number from the defined area&lt;br /&gt;
* [[Core Function RandomVar|RandomVar( &amp;lt;seed&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Generator a random number&lt;br /&gt;
* [[Core Function RandomSeed|RandomSeed( &amp;lt;flag&amp;gt;, &amp;lt;size&amp;gt; )]] -- Generator a cryptographically strong random number for use as a seed&lt;br /&gt;
* [[Core Function RandomSeedSet|RandomSeedSet( &amp;lt;seed&amp;gt; )]] -- Set the seed of Sputniks random number generator&lt;br /&gt;
* [[Core Function RevolutionsToDegrees|RevolutionsToDegrees( &amp;lt;value&amp;gt; )]] -- Converts revolutions to degrees.&lt;br /&gt;
* [[Core Function RevolutionsToRadians|RevolutionsToRadians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to radians.&lt;br /&gt;
* [[Core Function RevolutionsToGradians|RevolutionsToGradians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to gradians.&lt;br /&gt;
* [[Core Function Round|Round( &amp;lt;expression&amp;gt;, &amp;lt;decimalplaces&amp;gt; )]] -- Returns a number rounded to a specified number of decimal places&lt;br /&gt;
* [[Core Function RomToInt|RomToInt( &amp;lt;expression&amp;gt; )]] -- Returns the integer value of a roman numerical sequence&lt;br /&gt;
* [[Core Function Sin|Sin( &amp;lt;expression&amp;gt; )]] -- Returns the sine of the specified angle&lt;br /&gt;
* [[Core Function Sinh|Sinh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic sine of the specified angle&lt;br /&gt;
* [[Core Function SmoothStep|SmoothStep( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a cubic equation&lt;br /&gt;
* [[Core Function Sqrt|Sqrt( &amp;lt;expression&amp;gt; )]] -- Returns the square root of a specified number&lt;br /&gt;
* [[Core Function Sum|Sum( &amp;lt;expressions&amp;gt; )]] -- Returns the sum of all the parameters&lt;br /&gt;
* [[Core Function Tan|Tan( &amp;lt;expression&amp;gt; )]] -- Returns the tangent of the specified angle&lt;br /&gt;
* [[Core Function Tanh|Tanh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic tangent of the specified angle&lt;br /&gt;
* [[Core Function Truncate|Truncate( &amp;lt;expression&amp;gt; )]] -- Calculates the integral part of a specified decimal number&lt;br /&gt;
* [[Core Function WithinEpsilson|WithinEpsilson( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;epsilon&amp;gt; )]] -- Checks if value1 - value2 are almost equals within a float epsilon.&lt;br /&gt;
* [[Core Function Wrap|Wrap( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Wraps the specified value into a range&lt;br /&gt;
* [[Core Function WrapAngle|WrapAngle( &amp;lt;value&amp;gt; )]] -- Reduces a given angle to a value between π and -π.&lt;br /&gt;
* [[Core Function IsPrime|IsPrime( &amp;lt;expression&amp;gt; )]] -- Check if a number is a Prime number&lt;br /&gt;
&lt;br /&gt;
==== String Functions ====&lt;br /&gt;
* [[Core Function AddCSlashes|AddCSlashes( &amp;lt;str&amp;gt;, &amp;lt;charlist&amp;gt; )]] -- Escape a string with slashes in a C style&lt;br /&gt;
* [[Core Function AddBR|AddBR( &amp;lt;str&amp;gt; )]] -- Add HTML breaks to strings at newlines&lt;br /&gt;
* [[Core Function Asc|Asc( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function AscW|AscW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function AscArray|AscArray( &amp;lt;char&amp;gt; )]] -- Returns an array of ASCII characters of a string&lt;br /&gt;
* [[Core Function AscWArray|AscWArray( &amp;lt;char&amp;gt; )]] -- Returns an array of UNICODE characters of a string&lt;br /&gt;
* [[Core Function Between|Between( &amp;lt;haystack&amp;gt;, &amp;lt;firstneedle&amp;gt;, &amp;lt;secondneedle&amp;gt;, &amp;lt;case&amp;gt; )]] -- Return the text between a start and end substring&lt;br /&gt;
* [[Core Function BCrypt|BCrypt( &amp;lt;expression&amp;gt;, &amp;lt;rounds&amp;gt; )]] -- Hash a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function BCryptVerify|BCryptVerify( &amp;lt;expression&amp;gt;, &amp;lt;hash&amp;gt; )]] -- Verify a hash to a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function CSetMatch|CSetMatch( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Check if a string contains only characters from a substring(charset)&lt;br /&gt;
* [[Core Function CSetDel|CSetDel( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Delete all characters found in the charset from a string&lt;br /&gt;
* [[Core Function ChunkSplit|ChunkSplit( &amp;lt;body&amp;gt;, &amp;lt;chunklen&amp;gt;, &amp;lt;end&amp;gt; )]] -- Split a string into smaller chunks&lt;br /&gt;
* [[Core Function Chop|Chop( &amp;lt;variable&amp;gt; )]] -- Removes and returns the last character from a string&lt;br /&gt;
* [[Core Function Chomp|Chomp( &amp;lt;variable&amp;gt; )]] -- Removes trailing newlines and returns the number of characters removed&lt;br /&gt;
* [[Core Function CountChars|CountChars( &amp;lt;string&amp;gt; )]] -- Return information about characters used in a string&lt;br /&gt;
* [[Core Function CountWords|CountWords( &amp;lt;string&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;charlist&amp;gt;, &amp;lt;outputArray&amp;gt; )]] -- Return information about words used in a string&lt;br /&gt;
* [[Core Function Chr|Chr( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an ASCII code&lt;br /&gt;
* [[Core Function ChrW|ChrW( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an UNICODE code&lt;br /&gt;
* [[Core Function ChrArray|ChrArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array ASCII codes&lt;br /&gt;
* [[Core Function ChrWArray|ChrWArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array UNICODE codes&lt;br /&gt;
* [[Core Function CRC32|CRC32( &amp;lt;string&amp;gt; )]] -- Calculates the crc32 polynomial of a string&lt;br /&gt;
* [[Core Function Crypt|Crypt( &amp;lt;string&amp;gt;, &amp;lt;salt&amp;gt; )]] -- One-way string hashing&lt;br /&gt;
* [[Core Function Contains|Contains( &amp;lt;srting&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains a sub string&lt;br /&gt;
* [[Core Function ContainsAny|ContainsAny( &amp;lt;srting&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains any of the given strings from an array&lt;br /&gt;
* [[Core Function CountFields|CountFields( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns the number of values (fields) in the string passed that are separated by the separator string passed&lt;br /&gt;
* [[Core Function CSV|CSV( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Split strings and parse a CSV text into an array&lt;br /&gt;
* [[Core Function DecOct|DecOct( &amp;lt;expression&amp;gt; )]] -- Decimal to octal&lt;br /&gt;
* [[Core Function Dec|Dec( &amp;lt;expression&amp;gt; )]] -- Returns a integer representation of a hexadecimal string&lt;br /&gt;
* [[Core Function FDec|FDec( &amp;lt;expression&amp;gt; )]] -- Returns a float representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DDec|DDec( &amp;lt;expression&amp;gt; )]] -- Returns a double representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DecPad|DecPad( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pads numeric string to a given number of chars (Filling in the gap with zeros)&lt;br /&gt;
* [[Core Function DecryptString|DecryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Decrypt a string with a given password&lt;br /&gt;
* [[Core Function Decode64|Decode64( &amp;lt;expression&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Decodes string with MIME base64&lt;br /&gt;
* [[Core Function Encode64|Encode64( &amp;lt;expression&amp;gt; )]] -- Encodes string with MIME base64&lt;br /&gt;
* [[Core Function Escape|Escape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to a string&lt;br /&gt;
* [[Core Function EscapeMeta|EscapeMeta( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to meta characters&lt;br /&gt;
* [[Core Function EscapeShellArg|EscapeShellArg( &amp;lt;arg&amp;gt; )]] -- Escape a string to be used as a shell argument&lt;br /&gt;
* [[Core Function EscapeShellCmd|EscapeShellCmd( &amp;lt;command&amp;gt; )]] -- Escape shell metacharacters&lt;br /&gt;
* [[Core Function EncryptString|EncryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Encrypt a string with a given password&lt;br /&gt;
* [[Core Function EndsWith|EndsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string ends with a substring&lt;br /&gt;
* [[Core Function Hash|Hash( &amp;lt;expression&amp;gt; )]] -- Generate a unique hash code for a string value&lt;br /&gt;
* [[Core Function Hebrev|Hebrev( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text&lt;br /&gt;
* [[Core Function Hebrevc|Hebrevc( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text with newline conversion&lt;br /&gt;
* [[Core Function Hex2Str|Hex2Str( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a hex string back to a normal string&lt;br /&gt;
* [[Core Function Hex|Hex( &amp;lt;expression&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a string representation of an integer type converted to hexadecimal&lt;br /&gt;
* [[Core Function HTMLTranslationTable|HTMLTranslationTable( &amp;lt;the_table&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt; )]] -- Returns the translation table used by HTMLSpecialChars() and HTMLEntities()&lt;br /&gt;
* [[Core Function HTMLEntities|HTMLEntities( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all applicable characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLEntityDecode|HTMLEntityDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all HTML entities to their applicable characters&lt;br /&gt;
* [[Core Function HTMLSpecialChars|HTMLSpecialChars( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert special characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLSpecialCharsDecode|HTMLSpecialCharsDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Convert special HTML entities back to characters &lt;br /&gt;
* [[Core Function HTTPMakeQuery|HTTPMakeQuery( &amp;lt;array&amp;gt; )]] -- Converts an array into a properly formatted HTTP query string for use with requests etc&lt;br /&gt;
* [[Core Function HTTPParseQuery|HTTPParseQuery( &amp;lt;string&amp;gt; )]] -- Parse an HTTP query string into an array&lt;br /&gt;
* [[Core Function Fmt|Fmt( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a formatted string&lt;br /&gt;
* [[Core Function FmtNumber|FmtNumber( &amp;lt;number&amp;gt;, &amp;lt;decimals&amp;gt;, &amp;lt;dec_point&amp;gt;, &amp;lt;thousands_sep&amp;gt; )]] -- Format a number with grouped thousands&lt;br /&gt;
* [[Core Function FHex|FHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an float type converted to hexadecimal&lt;br /&gt;
* [[Core Function DHex|DHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an double type converted to hexadecimal&lt;br /&gt;
* [[Core Function Find|Find( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;plain&amp;gt; )]] -- Search for a match in a string and return the match with its found position and length&lt;br /&gt;
* [[Core Function GMatch|GMatch( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;asKeypair&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Extract the patterns from a string and return as array or associative array&lt;br /&gt;
* [[Core Function GSub|GSub( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;repl&amp;gt;, &amp;lt;max&amp;gt; )]] -- Returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function)&lt;br /&gt;
* [[Core Function InStr|InStr( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Checks if a string contains a given substring&lt;br /&gt;
* [[Core Function InStrRev|InStrRev( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Same as InStr() but searches from right to left instead of left to right&lt;br /&gt;
* [[Core Function isAlpha|isAlpha( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only Alphabetic characters&lt;br /&gt;
* [[Core Function isAlphaNumeric|isAlphaNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters&lt;br /&gt;
* [[Core Function isASCII|isASCII( &amp;lt;expression&amp;gt; )]] -- Check if string contains only ASCII chars&lt;br /&gt;
* [[Core Function isControl|isControl( &amp;lt;expression&amp;gt; )]] -- Check if string contains only control chars&lt;br /&gt;
* [[Core Function isEmpty|isEmpty( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty&lt;br /&gt;
* [[Core Function isEmptyOrNull|isEmptyOrNull( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty or if the variable is null or if the variable translates to false (zero)&lt;br /&gt;
* [[Core Function IsGraph|IsGraph( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely only characters that have a graphical representation&lt;br /&gt;
* [[Core Function isDigit|isDigit( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers&lt;br /&gt;
* [[Core Function isFloat|isFloat( &amp;lt;expression&amp;gt; )]] -- Check if string contains a floating point and could be converted&lt;br /&gt;
* [[Core Function isLower|isLower( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only lowercase letters&lt;br /&gt;
* [[Core Function isNumeric|isNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers (Allows for float/double)&lt;br /&gt;
* [[Core Function isSpace|isSpace( &amp;lt;expression&amp;gt; )]] -- Check if string contains only whitespace&lt;br /&gt;
* [[Core Function isSymbol|isSymbol( &amp;lt;expression&amp;gt; )]] -- Check if string contains only symbol chars&lt;br /&gt;
* [[Core Function IsPunctuation|IsPunctuation( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a punctuation marks&lt;br /&gt;
* [[Core Function IsSeparator|IsSeparator( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a separator character&lt;br /&gt;
* [[Core Function IsBlank|IsBlank( &amp;lt;expression&amp;gt; )]] -- Check if string contains only spaces and tabs&lt;br /&gt;
* [[Core Function isString|isString( &amp;lt;expression&amp;gt; )]] -- Check if variable contains only string chars&lt;br /&gt;
* [[Core Function isUpper|isUpper( &amp;lt;expression&amp;gt; )]] -- Check if string contains only uppercase chars&lt;br /&gt;
* [[Core Function isXDigit|isXDigit( &amp;lt;expression&amp;gt; )]] -- Check if string contains only hex chars&lt;br /&gt;
* [[Core Function IndexOf|IndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of the specified string in a string&lt;br /&gt;
* [[Core Function IndexOfAny|IndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function IndexNotOf|IndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function IndexNotOfAny|IndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexOf|LastIndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexOfAny|LastIndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexNotOf|LastIndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexNotOfAny|LastIndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function JsonEncode|JsonEncode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Returns the JSON representation of a value&lt;br /&gt;
* [[Core Function JsonDecode|JsonDecode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Decodes a JSON string&lt;br /&gt;
* [[Core Function Levenshtein|Levenshtein( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;cost_ins&amp;gt;, &amp;lt;cost_rep&amp;gt;, &amp;lt;cost_de&amp;gt; )]] -- Calculate Levenshtein distance between two strings&lt;br /&gt;
* [[Core Function LC|LC( &amp;lt;expression&amp;gt; )]] -- Returns string in all lower case&lt;br /&gt;
* [[Core Function LCFirst|LCFirst( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of string&lt;br /&gt;
* [[Core Function LCLast|LCLast( &amp;lt;expression&amp;gt; )]] -- Lower Cases last letter of string&lt;br /&gt;
* [[Core Function LCWords|LCWords( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of each word in string&lt;br /&gt;
* [[Core Function Left|Left( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the left-hand side of a string&lt;br /&gt;
* [[Core Function Lines|Lines( &amp;lt;expression&amp;gt; )]] -- Returns an array containing all the lines from a string&lt;br /&gt;
* [[Core Function Match|Match( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Search for the first match of pattern in a string if found return the captures from the pattern&lt;br /&gt;
* [[Core Function Metaphone|Metaphone( &amp;lt;string&amp;gt;, &amp;lt;phonemes&amp;gt; )]] -- Calculate the metaphone key of a string&lt;br /&gt;
* [[Core Function MD5|MD5( &amp;lt;expression&amp;gt; )]] -- Creates MD5 Hash of specified string&lt;br /&gt;
* [[Core Function NthField|NthField( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns a field from a row of data (such as comma separated text)&lt;br /&gt;
* [[Core Function Ord|Ord( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function OrdW|OrdW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function Oct|Oct( &amp;lt;string&amp;gt; )]] -- Converts an octal string into the numerical corresponding value&lt;br /&gt;
* [[Core Function PadLeft|PadLeft( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the left of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PadRight|PadRight( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the right of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PrintableEncode|PrintableEncode( &amp;lt;string )]] -- Convert a quoted-printable string to an 8 bit string&lt;br /&gt;
* [[Core Function PrintableDecode|PrintableDecode( &amp;lt;string )]] -- Convert a 8 bit string to a quoted-printable string&lt;br /&gt;
* [[Core Function RandStr|RandStr( &amp;lt;count&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Generate a random sequence of characters at a given length&lt;br /&gt;
* [[Core Function RegexMatch|RegexMatch( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;matches&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression match&lt;br /&gt;
* [[Core Function RegexReplace|RegexReplace( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;limit&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression search and replace&lt;br /&gt;
* [[Core Function RegexEscape|RegexEscape( &amp;lt;expression&amp;gt;, &amp;lt;delimiter&amp;gt; )]] -- Escape regular expression characters&lt;br /&gt;
* [[Core Function RegexUnescape|RegexUnescape( &amp;lt;expression&amp;gt; )]] -- Remove any escapes regular expression characters&lt;br /&gt;
* [[Core Function ResolveStr|ResolveStr( &amp;lt;expression&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Treat a given string as if it was a Sputnik &amp;quot;string&amp;quot; and parse all stuff inside it such as $variables etc&lt;br /&gt;
* [[Core Function Repeat|Repeat( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new string or new array containing repeats of a string provided&lt;br /&gt;
* [[Core Function Replace|Replace( &amp;lt;expression&amp;gt;, &amp;lt;find&amp;gt;, &amp;lt;replace&amp;gt;, &amp;lt;case-sensitive-flag&amp;gt; )]] -- Replace substrings within a string with other strings&lt;br /&gt;
* [[Core Function Reverse|Reverse( &amp;lt;expression&amp;gt; )]] -- Reverse all characters in a string&lt;br /&gt;
* [[Core Function RevHex|RevHex( &amp;lt;expression&amp;gt; )]] -- Reverse a string of hex digits&lt;br /&gt;
* [[Core Function Right|Right( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the right-hand side of a string&lt;br /&gt;
* [[Core Function Rot13|Rot13( &amp;lt;str&amp;gt; )]] -- Perform the rot13 transform on a string&lt;br /&gt;
* [[Core Function Scanf|Scanf( &amp;lt;expression&amp;gt;, &amp;lt;def&amp;gt; )]] -- Parses input from a string according to a format&lt;br /&gt;
* [[Core Function SHA1|SHA1( &amp;lt;expression&amp;gt; )]] -- Returns SHA1 hash of string&lt;br /&gt;
* [[Core Function Serialize|Serialize( &amp;lt;variable&amp;gt; )]] -- Convert a variable, array, class etc a string you can save to file or transfer over the internet&lt;br /&gt;
* [[Core Function SimilarText|SimilarText( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;percent&amp;gt; )]] -- Calculates the similarity between two input strings and return a percentage of the matching between the two input strings&lt;br /&gt;
* [[Core Function Split|Split( &amp;lt;expression&amp;gt;, &amp;lt;delim/pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Splits up a string into substrings depending on the given delimiters.&lt;br /&gt;
* [[Core Function SPrintf|SPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function)&lt;br /&gt;
* [[Core Function StartsWith|StartsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string starts with a substring&lt;br /&gt;
* [[Core Function StrChr|StrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate first occurrence of character in string&lt;br /&gt;
* [[Core Function StrrChr|StrrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate last occurrence of character in string&lt;br /&gt;
* [[Core Function StrShuffle|StrShuffle( &amp;lt;str&amp;gt; )]] --  Randomly shuffles a string&lt;br /&gt;
* [[Core Function Strpbrk|Strpbrk( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate a list of possible characters in string and return the position of it&lt;br /&gt;
* [[Core Function StripCSlashes|StripCSlashes( &amp;lt;str&amp;gt; )]] -- Unescape string escaped with AddCSlashes()&lt;br /&gt;
* [[Core Function StripTags|StripTags( &amp;lt;str&amp;gt;, &amp;lt;allowable_tags&amp;gt; )]] -- Strip HTML tags from a string&lt;br /&gt;
* [[Core Function StripWS|StripWS( &amp;lt;str&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;charList&amp;gt; )]] -- Strips the white space in a string or given characters.&lt;br /&gt;
* [[Core Function StrSpn|StrSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask&lt;br /&gt;
* [[Core Function StrCSpn|StrCSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Find length of initial segment not matching mask&lt;br /&gt;
* [[Core Function StrCmp|StrCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- String comparison&lt;br /&gt;
* [[Core Function StrNatCmp|StrNatCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparisons using a &amp;quot;natural order&amp;quot; algorithm&lt;br /&gt;
* [[Core Function StrVersCmp|StrVersCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparison holding name and indices/version numbers&lt;br /&gt;
* [[Core Function Soundex|Soundex( &amp;lt;str&amp;gt; )]] -- Calculate the soundex key of a string&lt;br /&gt;
* [[Core Function Str2Hex|Str2Hex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to a hex string&lt;br /&gt;
* [[Core Function StrNew|StrNew( &amp;lt;char&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; ]] -- Create a new string of a given length filled with a given char&lt;br /&gt;
* [[Core Function StrInsert|StrInsert( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Insert a string at a given index of another string and return the new string&lt;br /&gt;
* [[Core Function StrIndex|StrIndex( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get or set a char from/to a string at a specific index&lt;br /&gt;
* [[Core Function StrIncrement|StrIncrement( &amp;lt;str&amp;gt; )]] -- Increment a string the same way as doing ++ on a string like $a++&lt;br /&gt;
* [[Core Function StrPos|StrPos( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the position of the first/last occurrence of a substring in a string&lt;br /&gt;
* [[Core Function StrTr|StrTr( &amp;lt;str&amp;gt;, &amp;lt;from-to/replace_pairs&amp;gt; )]] -- Translate characters or replace substrings&lt;br /&gt;
* [[Core Function StrTok|StrTok( &amp;lt;str/token&amp;gt;, &amp;lt;token&amp;gt; )]] -- Tokenize string&lt;br /&gt;
* [[Core Function StrStr|StrStr( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;before_needle&amp;gt;, &amp;lt;find_last&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first/last occurrence of a string&lt;br /&gt;
* [[Core Function StrLen|StrLen( &amp;lt;expression&amp;gt; )]] -- Returns length of specified string&lt;br /&gt;
* [[Core Function SubStr|SubStr( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function SubStrCount|SubStrCount( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Count the number of substring occurrences&lt;br /&gt;
* [[Core Function SubStrCmp|SubStrCmp( &amp;lt;main_str&amp;gt;, &amp;lt;str&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Comparison of two strings from an offset, up to length characters&lt;br /&gt;
* [[Core Function SubStrReplace|SubStrReplace( &amp;lt;expression&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace text within a portion of a string&lt;br /&gt;
* [[Core Function Sub|Sub( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function StrSplit|StrSplit( &amp;lt;expression&amp;gt;, &amp;lt;split_length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to an array&lt;br /&gt;
* [[Core Function StrCompress|StrCompress( &amp;lt;expression&amp;gt; )]] -- Compress a string&lt;br /&gt;
* [[Core Function StrUncompress|StrUncompress( &amp;lt;expression&amp;gt; )]] -- Uncompress a string&lt;br /&gt;
* [[Core Function Trim|Trim( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Removes whitespace from the beginning and end of a string&lt;br /&gt;
* [[Core Function TrimLeft|TrimLeft( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the start of a string&lt;br /&gt;
* [[Core Function TrimRight|TrimRight( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the end of a string&lt;br /&gt;
* [[Core Function TrimToNull|TrimToNull( &amp;lt;string&amp;gt; )]] -- Strip all zero chars (nulls) from the end of a string&lt;br /&gt;
* [[Core Function UC|UC( &amp;lt;expression&amp;gt; )]] -- Returns string in all Upper Case&lt;br /&gt;
* [[Core Function UCFirst|UCFirst( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of string&lt;br /&gt;
* [[Core Function UCLast|UCLast( &amp;lt;expression&amp;gt; )]] -- Upper Cases last letter of string&lt;br /&gt;
* [[Core Function UCWords|UCWords( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of each word in string&lt;br /&gt;
* [[Core Function UUEncode|UUEncode( &amp;lt;expression&amp;gt; )]] -- Encodes a string using the uuencode algorithm&lt;br /&gt;
* [[Core Function UUDecode|UUDecode( &amp;lt;expression&amp;gt; )]] -- Decodes a string that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function Unescape|Unescape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Remove all escapes from a string&lt;br /&gt;
* [[Core Function Unserialize|Unserialize( &amp;lt;string&amp;gt; )]] -- Convert a string (Created with Serialize()) into its original variable/class/array etc&lt;br /&gt;
* [[Core Function UrlEncodeBytes|UrlEncodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Cnvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function UrlDecodeBytes|UrlDecodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Convert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function VSPrintf|VSPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function) but accepts arrays as the arguments&lt;br /&gt;
* [[Core Function WordWrap|WordWrap( &amp;lt;str&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;break&amp;gt;, &amp;lt;cut&amp;gt; )]] -- Wraps a string to a given number of characters&lt;br /&gt;
&lt;br /&gt;
==== Array Functions ====&lt;br /&gt;
* [[Core Function SameValues|SameValues( &amp;lt;array&amp;gt; )]] -- Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* [[Core Function ArrayScope|ArrayScope( &amp;lt;array&amp;gt;, &amp;lt;scope&amp;gt; )]] -- Get or Set an arrays internal Sputnik scope (Only to be used by Sputnik library developers)&lt;br /&gt;
* [[Core Function IsHash|IsHash( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Strings rather than numeric (Making it a full hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsHashAny|IsHashAny( &amp;lt;array&amp;gt; )]] -- Check if any of the keys in an array are Strings rather than numeric (Making it a possible hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsArray|IsArray( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Numeric and none are String (Making it a full array rather than full hashmap or mixed)&lt;br /&gt;
* [[Core Function IsList|IsList( &amp;lt;array&amp;gt; )]] -- Same as IsArray but also checks to make sure the keys start at 0 and end at the highest with no gaps which makes it a perfect list&lt;br /&gt;
* [[Core Function Array|Array( &amp;lt;expressions&amp;gt; )]] -- Create a new array&lt;br /&gt;
* [[Core Function Clear|Clear( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Remove all items from an array&lt;br /&gt;
* [[Core Function Join|Join( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array into a string with an optional separator&lt;br /&gt;
* [[Core Function JoinKV|JoinKV( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array (as keys and values) into a string with an optional separator&lt;br /&gt;
* [[Core Function Count|Count( &amp;lt;array/binary-array/class&amp;gt; )]] -- Returns the size of array (How many elements it currently has stored)&lt;br /&gt;
* [[Core Function Fill|Fill( &amp;lt;start&amp;gt;, &amp;lt;num&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values&lt;br /&gt;
* [[Core Function FillKeys|FillKeys( &amp;lt;keys&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values, specifying keys&lt;br /&gt;
* [[Core Function UBound|UBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the highest element in an array&lt;br /&gt;
* [[Core Function LBound|LBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the lowest element in an array&lt;br /&gt;
* [[Core Function Push|Push( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the end of an array&lt;br /&gt;
* [[Core Function PushArray|PushArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the end of an array&lt;br /&gt;
* [[Core Function Insert|Insert( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to an array at a given location&lt;br /&gt;
* [[Core Function InsertArray|InsertArray( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;arrays&amp;gt; )]] -- Add arrays to an array at a given location&lt;br /&gt;
* [[Core Function Pad|Pad( &amp;lt;array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pad array to the specified length with a value&lt;br /&gt;
* [[Core Function Unshift|Unshift( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the beginning of an array&lt;br /&gt;
* [[Core Function UnshiftArray|UnshiftArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the beginning of an array&lt;br /&gt;
* [[Core Function Pop|Pop( &amp;lt;array&amp;gt; )]] -- Delete the last item in an array&lt;br /&gt;
* [[Core Function Shift|Shift( &amp;lt;array&amp;gt; )]] -- Delete the first item in an array&lt;br /&gt;
* [[Core Function Range|Range( &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;step&amp;gt; )]] -- Create an array containing a range of elements&lt;br /&gt;
* [[Core Function Remove|Remove( &amp;lt;array&amp;gt;, &amp;lt;start-id&amp;gt;, &amp;lt;end-id&amp;gt; )]] -- Delete items from an array starting at a given location and stopping at a given location&lt;br /&gt;
* [[Core Function RemoveValue|RemoveValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific value or all matching values from an array&lt;br /&gt;
* [[Core Function RemoveValues|RemoveValues( &amp;lt;array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of specific values from an array&lt;br /&gt;
* [[Core Function RemoveKey|RemoveKey( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific key from an array&lt;br /&gt;
* [[Core Function RemoveKeys|RemoveKeys( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of keys from an recursively from an array&lt;br /&gt;
* [[Core Function IsIndexSet|IsIndexSet( &amp;lt;array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an element exist at a given index ID within an array&lt;br /&gt;
* [[Core Function Grep|Grep( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays values that match the given regex pattern&lt;br /&gt;
* [[Core Function GrepKeys|GrepKeys( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays keys that match the given regex pattern&lt;br /&gt;
* [[Core Function Search|Search( &amp;lt;array&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;invert_flag&amp;gt;, &amp;lt;returnKeys&amp;gt; )]] -- Returns a new array consisting of the elements of the input array that match the given value&lt;br /&gt;
* [[Core Function Combine|Combine( &amp;lt;array-keys&amp;gt;, &amp;lt;array-values&amp;gt; )]] -- Creates a hash (Dictionary) by using the values from the keys array as keys and the values from the values array as the corresponding values&lt;br /&gt;
* [[Core Function Walk|Walk( &amp;lt;array&amp;gt;, &amp;lt;function&amp;gt; )]] -- Walk through the arrays items and execute a user defined function on each one&lt;br /&gt;
* [[Core Function Rev|Rev( &amp;lt;array&amp;gt; )]] -- Returns a new array consisting of the reverse of another array&lt;br /&gt;
* [[Core Function IsKeySet|IsKeySet( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt; )]] -- Check if given key exists within an array&lt;br /&gt;
* [[Core Function IsKeysSet|IsKeysSet( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if any/all/none of a given key from a key array was found inside an array&lt;br /&gt;
* [[Core Function Keys|Keys( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all KEYS from an array&lt;br /&gt;
* [[Core Function Values|Values( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all VALUES from an array&lt;br /&gt;
* [[Core Function InArray|InArray( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Checks if a value exists in an array&lt;br /&gt;
* [[Core Function Flip|Flip( &amp;lt;array&amp;gt; )]] -- Exchanges all keys with their associated values in an array&lt;br /&gt;
* [[Core Function Splice|Splice( &amp;lt;array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;replace_with&amp;gt; )]] -- Cut out and return a chunk or portion of an array and optionally replace the cut out section with new data.&lt;br /&gt;
* [[Core Function Order|Order( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Fix the order of numeric array elements from 0 to whatever.&lt;br /&gt;
* [[Core Function Sort|Sort( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Sort an array by value or keys optionally modify it in place or return new and optionally use a custom function to decide how to sort it&lt;br /&gt;
* [[Core Function CountValues|CountValues( &amp;lt;array&amp;gt; )]] -- Counts all the values of an array&lt;br /&gt;
* [[Core Function SumKeys|SumKeys( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the keys of an array&lt;br /&gt;
* [[Core Function SumValues|SumValues( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the values of an array&lt;br /&gt;
* [[Core Function IndexOfValue|IndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexOfValueAny|IndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array) exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexNotOfValue|IndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the first index that does not contain the value&lt;br /&gt;
* [[Core Function IndexNotOfValueAny|IndexNotOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value (from an array) in an array and returns the first index that does not contain any of the values&lt;br /&gt;
* [[Core Function LastIndexOfValue|LastIndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns the index of the last occurrence of the value&lt;br /&gt;
* [[Core Function LastIndexOfValueAny|LastIndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array of values) exists in an array and returns the index of the last occurrence of the value (from the value array)&lt;br /&gt;
* [[Core Function LastIndexNotOfValue|LastIndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the last index that does not contain the value&lt;br /&gt;
&lt;br /&gt;
==== Linq (Integrated Language Query) Functions ====&lt;br /&gt;
These functions are basically quick ways to shuffle arrays around (sort and organize them etc) and are BEST suited for when the array contains nothing but Classes but you can use them on any array if you want.&lt;br /&gt;
* [[Core Function All|All( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of all elements in the query are a true match&lt;br /&gt;
* [[Core Function Any|Any( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of any of the elements in the query are a true match&lt;br /&gt;
* [[Core Function Concat|Concat( &amp;lt;array&amp;gt;, &amp;lt;array&amp;gt;... )]] -- Join multiple arrays (query results?) together&lt;br /&gt;
* [[Core Function First|First( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the first matching element from the query&lt;br /&gt;
* [[Core Function FirstOrDefault|FirstOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the first matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Last|Last( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the last matching element from the query&lt;br /&gt;
* [[Core Function LastOrDefault|LastOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the last matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Where|Where( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and returns all matching&lt;br /&gt;
* [[Core Function WhereNot|WhereNot( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and all non matching&lt;br /&gt;
* [[Core Function SumInt|SumInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as an Int64&lt;br /&gt;
* [[Core Function SumUInt|SumUInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a UInt64&lt;br /&gt;
* [[Core Function SumDouble|SumDouble( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a Double&lt;br /&gt;
* [[Core Function Obtain|Obtain( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Gathers up all matching elements from the query and returns them (Unlike Where() this returns the values directly instead of their source so instead of returning the class it will return the variable)&lt;br /&gt;
&lt;br /&gt;
==== Enum Functions ====&lt;br /&gt;
* [[Core Function Enumerate|Enumerate( &amp;lt;enum&amp;gt; )]] -- Cycle through all Name + Values in an enum&lt;br /&gt;
* [[Core Function EnumKey|EnumKey( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the string KEY for a given integer value&lt;br /&gt;
* [[Core Function EnumValue|EnumValue( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the integer value for a given string KEY&lt;br /&gt;
* [[Core Function EnumAdd|EnumAdd( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add a new key and value to an existing enum&lt;br /&gt;
* [[Core Function EnumDel|EnumDel( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt; )]] -- Delete a key and value from an existing enum&lt;br /&gt;
* [[Core Function EnumIsDefined|EnumIsDefined( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a given value exists within an enum&lt;br /&gt;
&lt;br /&gt;
==== Process Functions ====&lt;br /&gt;
* [[Core Function DLLCall|DLLCall( &amp;lt;Dll/DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt;, &amp;lt;Parms&amp;gt; )]] -- Dynamically call a function in a DLL&lt;br /&gt;
* [[Core Function DLLOpen|DLLOpen( &amp;lt;DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt; )]] -- Open a DLL and get a function from it and return it as a ready to call object function that is already compiled (vastly speeding up the repeat call speed)&lt;br /&gt;
* [[Core Function DLLClose|DLLClose( &amp;lt;DLL&amp;gt; )]] -- Close and unset a return value from DLLOpen()&lt;br /&gt;
* [[Core Function DLLImport|DLLImport( &amp;lt;varies...&amp;gt; )]] -- Dynamically load a function from a DLL and transform it to act and behave like a normal Sputnik function (Can load thousands functions at a time and even save the loaded stuff to DLL for quick access later)&lt;br /&gt;
* [[Core Function Exec|Exec( &amp;lt;command&amp;gt;, &amp;lt;output&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program&lt;br /&gt;
* [[Core Function ExecShell|ExecShell( &amp;lt;command&amp;gt; )]] -- Execute command via shell and return the complete output as a string&lt;br /&gt;
* [[Core Function ExecSystem|ExecSystem( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display the output&lt;br /&gt;
* [[Core Function Passthru|Passthru( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display raw output&lt;br /&gt;
* [[Core Function System|System( &amp;lt;expression&amp;gt; )]] -- Execute system command&lt;br /&gt;
* [[Core Function Run|Run( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program&lt;br /&gt;
* [[Core Function RunWait|RunWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program and waits until the program finishes&lt;br /&gt;
* [[Core Function RunShell|RunShell( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute)&lt;br /&gt;
* [[Core Function RunShellWait|RunShellWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute) and waits until the program finishes&lt;br /&gt;
* [[Core Function RunAsSet|RunAsSet( &amp;lt;user&amp;gt;, &amp;lt;domain&amp;gt;, &amp;lt;password&amp;gt;, &amp;lt;options&amp;gt; )]] -- Initialise a set of user credentials to use during Run and RunWait operations.&lt;br /&gt;
* [[Core Function RunCapture|RunCapture( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Run a program in a hidden window and capture its printed output as strings&lt;br /&gt;
* [[Core Function PHandle|PHandle( )]] -- Get the process handle of this program&lt;br /&gt;
* [[Core Function ProcessClose|ProcessClose( &amp;lt;pid/name&amp;gt; )]] -- Terminates a named process&lt;br /&gt;
* [[Core Function ProcessID|ProcessID( &amp;lt;name&amp;gt; )]] -- Gets the process ID of a given name&lt;br /&gt;
* [[Core Function ProcessExists|ProcessExists( &amp;lt;pid/name&amp;gt; )]] -- Checks to see if a specified process exists&lt;br /&gt;
* [[Core Function ProcessList|ProcessList( &amp;lt;name&amp;gt; )]] -- Returns an array listing the currently running processes (names and PIDs)&lt;br /&gt;
* [[Core Function ProcessSetPriority|ProcessSetPriority( &amp;lt;pid/name&amp;gt;, &amp;lt;priority&amp;gt; )]] -- Changes the priority of a process&lt;br /&gt;
* [[Core Function ProcessWait|ProcessWait( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process exists or optional the timeout expires&lt;br /&gt;
* [[Core Function ProcessWaitClose|ProcessWaitClose( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process no longer exists or optional the timeout expires&lt;br /&gt;
* [[Core Function Shutdown|Shutdown( &amp;lt;shutdown code&amp;gt; )]] -- Shuts down the system&lt;br /&gt;
* [[Core Function Debug|Debug( &amp;lt;flag&amp;gt; )]] -- Enter or leave debug mode in debug state the program can interact with operating system processes that run in a special mode by enabling the native property SeDebugPrivilege on the current thread&lt;br /&gt;
&lt;br /&gt;
==== Environment Management ====&lt;br /&gt;
* [[Core Function EnvExpand|EnvExpand( &amp;lt;expression&amp;gt; )]] -- Convert a string containing %name% env tags and return complete string with names resolved&lt;br /&gt;
* [[Core Function EnvGet|EnvGet( &amp;lt;tag&amp;gt; )]] -- Get the value of an environment variable&lt;br /&gt;
* [[Core Function EnvSet|EnvSet( &amp;lt;tag&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set the value of an environment variable&lt;br /&gt;
* [[Core Function EnvUpdate|EnvUpdate( )]] -- Refreshes the OS environment&lt;br /&gt;
&lt;br /&gt;
==== File Functions ====&lt;br /&gt;
&lt;br /&gt;
===== File Create/Read/Write Functions =====&lt;br /&gt;
* [[Core Function FileOpen|FileOpen( &amp;lt;FileName&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Opens a file for reading or writing&lt;br /&gt;
* [[Core Function FileOpenText|FileOpenText( &amp;lt;FileName&amp;gt; )]] -- Opens a file for reading only (text files only)&lt;br /&gt;
* [[Core Function FileClose|FileClose( &amp;lt;file&amp;gt; )]] -- Closes a previously opened file&lt;br /&gt;
* [[Core Function FileWrite|FileWrite( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write text to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteBinary|FileWriteBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Write the data from a binary variable to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteLines|FileWriteLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write an array of lines to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileAppend|FileAppend( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append a line of text to the end of a previously opened text file&lt;br /&gt;
* [[Core Function FileAppendBinary|FileAppendBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Append the data from a binary variable to the end of a previously opened file&lt;br /&gt;
* [[Core Function FileAppendLines|FileAppendLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append an array of lines to the end of previously opened file&lt;br /&gt;
* [[Core Function FileSeek|FileSeek( &amp;lt;file&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Change the POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FilePos|FilePos( &amp;lt;file&amp;gt; )]] -- Get the current POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FileRead|FileRead( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a text file starting from current File Steam pointer location and return them as a string&lt;br /&gt;
* [[Core Function FileReadBinary|FileReadBinary( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a file starting from current File Steam pointer location&lt;br /&gt;
* [[Core Function FileReadLine|FileReadLine( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a line of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadLines|FileReadLines( &amp;lt;file&amp;gt; )]] -- Read all lines of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadText|FileReadText( &amp;lt;file&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;length&amp;gt; )]] -- Read text from a file opened by FileOpenText() using the format and length params&lt;br /&gt;
* [[Core Function FileTemp|FileTemp(  )]] -- Create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* [[Core Function FileSave|FileSave( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Save all text to a file&lt;br /&gt;
* [[Core Function FileLoad|FileLoad( &amp;lt;file&amp;gt; )]] -- Load all text from a file&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function FileMove|FileMove( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Move a file&lt;br /&gt;
* [[Core Function FileCopy|FileCopy( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Copy a file&lt;br /&gt;
* [[Core Function FileDelete|FileDelete( &amp;lt;file&amp;gt; )]] -- Delete a file&lt;br /&gt;
* [[Core Function FileExists|FileExists( &amp;lt;file&amp;gt; )]] -- Check if a given file exists&lt;br /&gt;
* [[Core Function FileCreationTime|FileCreationTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the creation time of a file&lt;br /&gt;
* [[Core Function FileWriteTime|FileWriteTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last write time of a file&lt;br /&gt;
* [[Core Function FileAccessTime|FileAccessTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last access time of a file&lt;br /&gt;
* [[Core Function FileEncrypt|FileEncrypt( &amp;lt;file&amp;gt; )]] -- Encrypt a file so only the windows account used to encrypt it can decrypt it&lt;br /&gt;
* [[Core Function FileDecrypt|FileDecrypt( &amp;lt;file&amp;gt; )]] -- Decrypt a file previously encrypted by this windows user account&lt;br /&gt;
* [[Core Function FileMD5|FileMD5( &amp;lt;file&amp;gt; )]] -- Calculate the MD5 checksum of a file&lt;br /&gt;
* [[Core Function FileSHA1|FileSHA1( &amp;lt;file&amp;gt; )]] -- Calculate the SHA1 checksum of a file&lt;br /&gt;
* [[Core Function FileSize|FileSize( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns the file size in bytes (or return the formatted size)&lt;br /&gt;
* [[Core Function FileIsText|FileIsText( &amp;lt;file&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns true if the file contains only text&lt;br /&gt;
* [[Core Function FileRecycleEmpty|FileRecycleEmpty( &amp;lt;root&amp;gt; )]] -- Empty the recycle bin with no GUI, sound or confirmation&lt;br /&gt;
* [[Core Function FileRecycle|FileRecycle( &amp;lt;filename&amp;gt; )]] -- Move a file or directory to the recycle bin&lt;br /&gt;
* [[Core Function FileMatch|FileMatch( &amp;lt;pattern&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Match filename against a Glob pattern&lt;br /&gt;
&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FileSaveDialog|FileSaveDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Save File Dialog&lt;br /&gt;
* [[Core Function FileOpenDialog|FileOpenDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Load File Dialog&lt;br /&gt;
&lt;br /&gt;
==== Directory Functions ====&lt;br /&gt;
* [[Core Function GetFiles|GetFiles ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all files in a directory&lt;br /&gt;
* [[Core Function GetFolders|GetFolders ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all folders in a directory&lt;br /&gt;
* [[Core Function Glob|Glob( &amp;lt;pattern&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Find files/folders matching a pattern&lt;br /&gt;
* [[Core Function MKDir|MKDir ( &amp;lt;path&amp;gt; )]] -- Creates all directories and subdirectories as specified by path&lt;br /&gt;
* [[Core Function RMDir|RMDir ( &amp;lt;path&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Deletes the specified directory and, if indicated, any subdirectories in the directory&lt;br /&gt;
* [[Core Function DirExists|DirExists ( &amp;lt;path&amp;gt; )]] -- Determines whether the given path refers to an existing directory on disk&lt;br /&gt;
* [[Core Function DirCopy|DirCopy ( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Copies a directory and all sub-directories and files (Similar to xcopy)&lt;br /&gt;
* [[Core Function DirMove|DirMove( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Moves a directory to another location&lt;br /&gt;
* [[Core Function DirSize|DirSize( &amp;lt;path&amp;gt; )]] -- Returns the size in bytes of a whole directory&lt;br /&gt;
* [[Core Function CurDir|CurDir ( &amp;lt;path&amp;gt; )]] -- Get or Set the current working directory&lt;br /&gt;
* [[Core Function CombinePath|CombinePath( &amp;lt;path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Safe way to combine two paths into one&lt;br /&gt;
* [[Core Function GetRelativePath|GetRelativePath( &amp;lt;Path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Try makes a path relative to another&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FolderSelectDialog|FolderSelectDialog ( &amp;lt;text&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;init dir&amp;gt; )]] -- Initiates a Browse For Folder Dialog&lt;br /&gt;
&lt;br /&gt;
==== Path Functions ====&lt;br /&gt;
* [[Core Function ParsePath|ParsePath ( &amp;lt;path&amp;gt; )]] -- Resolve a file name and locate its full path&lt;br /&gt;
* [[Core Function HasExtension|HasExtension ( &amp;lt;path&amp;gt; )]] -- Determines whether a path includes a file name extension&lt;br /&gt;
* [[Core Function GetFullPath|GetFullPath ( &amp;lt;path&amp;gt; )]] -- Returns the absolute path for the specified path string&lt;br /&gt;
* [[Core Function GetDirectoryName|GetDirectoryName ( &amp;lt;path&amp;gt; )]] -- Returns the directory information for the specified path string&lt;br /&gt;
* [[Core Function GetExtension|GetExtension ( &amp;lt;path&amp;gt; )]] -- Returns the extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileName|GetFileName ( &amp;lt;path&amp;gt; )]] -- Returns the file name and extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileNameWithoutExtension|GetFileNameWithoutExtension ( &amp;lt;path&amp;gt; )]] -- Returns the file name of the specified path string without the extension&lt;br /&gt;
* [[Core Function GetPathRoot|GetPathRoot ( &amp;lt;path&amp;gt; )]] -- Gets the root directory information of the specified path&lt;br /&gt;
* [[Core Function IsPathRooted|IsPathRooted ( &amp;lt;path&amp;gt; )]] -- Gets a value indicating whether the specified path string contains absolute or relative path information&lt;br /&gt;
* [[Core Function GetDosPath|GetDosPath( &amp;lt;path&amp;gt; )]] -- Returns a given path in DOS friendly style (shortened)&lt;br /&gt;
* [[Core Function AddPath|AddPath( &amp;lt;path&amp;gt; )]] -- Add a directory to the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
* [[Core Function DelPath|DelPath( &amp;lt;path&amp;gt; )]] -- Remove a directory from the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
&lt;br /&gt;
==== Network Functions ====&lt;br /&gt;
&lt;br /&gt;
===== HTTP Functions =====&lt;br /&gt;
* [[Core Function HTTPFileExists|HTTPFileExists( &amp;lt;url&amp;gt; )]] -- Check if a file exists at a given URL&lt;br /&gt;
* [[Core Function HTTPGetString|HTTPGetString( &amp;lt;url&amp;gt; )]] -- Copy all text from a URL and return it as a string&lt;br /&gt;
* [[Core Function HTTPDownload|HTTPDownload( &amp;lt;url&amp;gt;, &amp;lt;dest&amp;gt;, &amp;lt;progress&amp;gt;, &amp;lt;completed&amp;gt;, &amp;lt;param&amp;gt; )]] -- Download a file from a given URL&lt;br /&gt;
&lt;br /&gt;
===== MySQL Functions =====&lt;br /&gt;
* [[Core Function MySQLConnect|MySQLConnect( &amp;lt;ip/ip:port&amp;gt;, &amp;lt;login&amp;gt;, &amp;lt;password&amp;gt; )]] -- Connect to a MySQL database&lt;br /&gt;
* [[Core Function MySQLSelectDB|MySQLSelectDB( &amp;lt;mysql&amp;gt;, &amp;lt;db name&amp;gt; )]] -- Select a database&lt;br /&gt;
* [[Core Function MySQLQuery|MySQLQuery( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Execute a query&lt;br /&gt;
* [[Core Function MySQLFill|MySQLFill( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Grab a table or parts of it from the Database&lt;br /&gt;
* [[Core Function MySQLFetch|MySQLFetch( &amp;lt;mysql data&amp;gt; )]] -- Fetch the next row from a table&lt;br /&gt;
* [[Core Function MySQLFetchReset|MySQLFetchReset( &amp;lt;mysql data&amp;gt; )]] -- Reset the current position in the table rows to 0&lt;br /&gt;
* [[Core Function MySQLFields|MySQLFields( &amp;lt;mysql data&amp;gt; )]] -- Return how many Fields are in the table&lt;br /&gt;
* [[Core Function MySQLRows|MySQLRows( &amp;lt;mysql data&amp;gt; )]] -- Return how many Rows are in the table&lt;br /&gt;
* [[Core Function MySQLClose|MySQLClose( &amp;lt;mysql&amp;gt; )]] -- Close a MySQL connection&lt;br /&gt;
&lt;br /&gt;
===== Sputnik Client/Server Functions (This is just for connecting Sputnik Clients to Sputnik Servers nothing else) =====&lt;br /&gt;
* [[Core Function SSListen|SSListen( &amp;lt;port&amp;gt;, &amp;lt;max connections&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Create a server and begin listening for clients to connect&lt;br /&gt;
* [[Core Function SSConnect|SSConnect( &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;connection string&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Connect to a server&lt;br /&gt;
* [[Core Function SSApprove|SSApprove( &amp;lt;client socket&amp;gt; )]] -- Approve a client to connect to the server&lt;br /&gt;
* [[Core Function SSDisapprove|SSDisapprove( &amp;lt;client socket&amp;gt; )]] -- Disapprove a client to connect to the server&lt;br /&gt;
* [[Core Function SSClientStatus|SSClientStatus( &amp;lt;client/client socket&amp;gt; )]] -- Get the status of a client or of our client&lt;br /&gt;
* [[Core Function SSClientIP|SSClientIP( &amp;lt;client socket&amp;gt; )]] -- Get the IP of a client socket&lt;br /&gt;
* [[Core Function SSRecv|SSRecv( &amp;lt;server/client&amp;gt; )]] -- Check for a message recieved from client/server&lt;br /&gt;
* [[Core Function SSRead|SSRead( &amp;lt;client/server&amp;gt;, &amp;lt;data type&amp;gt; )]] --Read data from a client/server&lt;br /&gt;
* [[Core Function SSDrop|SSDrop( &amp;lt;client socket&amp;gt;, &amp;lt;reason&amp;gt; )]] -- Kick a client off the server&lt;br /&gt;
* [[Core Function SSSend|SSSend( /* depends... /* )]] -- Send data to client or server&lt;br /&gt;
* [[Core Function SSBufferNew|SSBufferNew( &amp;lt;nothing/server/client&amp;gt; )]] -- Create a new net buffer to store data to send to the client/server&lt;br /&gt;
* [[Core Function SSBufferPut|SSBufferPut( &amp;lt;netBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Add data to a net buffer&lt;br /&gt;
&lt;br /&gt;
===== Raw Sockets (TCP/UDP etc) =====&lt;br /&gt;
* [[Core Function SocketAccept|SocketAccept( &amp;lt;socket&amp;gt;  )]] -- Creates a new &amp;lt;socket&amp;gt; for a newly created connection&lt;br /&gt;
* [[Core Function SocketAvailable|SocketAvailable( &amp;lt;socket&amp;gt;  )]] -- Gets the amount of data that has been received from the network and is available to be read&lt;br /&gt;
* [[Core Function SocketBind|SocketBind( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Associates a &amp;lt;socket&amp;gt; with a local endpoint&lt;br /&gt;
* [[Core Function SocketClose|SocketClose( &amp;lt;socket&amp;gt;, &amp;lt;wait&amp;gt;  )]] -- Closes the &amp;lt;socket&amp;gt; connection and releases all associated resources&lt;br /&gt;
* [[Core Function SocketConnect|SocketConnect( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Establishes a connection to a remote host&lt;br /&gt;
* [[Core Function SocketConnected|SocketConnected( &amp;lt;socket&amp;gt; )]] -- Checks if a socket is connected and ready for use or not&lt;br /&gt;
* [[Core Function SocketCreate|SocketCreate( &amp;lt;sockettype&amp;gt;, &amp;lt;protocoltype&amp;gt;, &amp;lt;addressfamily&amp;gt; )]] -- Create a new &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketListen|SocketListen( &amp;lt;socket&amp;gt;, &amp;lt;backlog&amp;gt;  )]] -- Places a &amp;lt;socket&amp;gt; in a listening state&lt;br /&gt;
* [[Core Function SocketReceive|SocketReceive( &amp;lt;socket&amp;gt;, &amp;lt;buffersize&amp;gt;  )]] -- Receives data from a bound &amp;lt;socket&amp;gt; into a receive buffer&lt;br /&gt;
* [[Core Function SocketReadChar|SocketReadChar( &amp;lt;socket&amp;gt;, &amp;lt;count&amp;gt;  )]] -- Receives a single (or a specified amount) of char(s) from a bound &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketReadLine|SocketReadLine( &amp;lt;socket&amp;gt;  )]] -- Receives the next line from a bound &amp;lt;socket&amp;gt; (useful for Telnet style stuff)&lt;br /&gt;
* [[Core Function SocketSend|SocketSend( &amp;lt;socket&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketSendTo|SocketSendTo( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to the specified ip + port&lt;br /&gt;
* [[Core Function SocketSendFile|SocketSendFile( &amp;lt;socket&amp;gt;, &amp;lt;file-name&amp;gt;  )]] -- Sends a file as data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIP|SocketIP( &amp;lt;socket&amp;gt;, &amp;lt;remote/local&amp;gt;  )]] -- Get the Remote or Local IP of a socket&lt;br /&gt;
* [[Core Function SocketShutdown|SocketShutdown( &amp;lt;socket&amp;gt;, &amp;lt;shutdown-type&amp;gt;  )]] -- Disables sends and receives on a &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketPoll|SocketPoll( &amp;lt;socket&amp;gt;, &amp;lt;milliseconds&amp;gt;, &amp;lt;type&amp;gt;  )]] -- Sends a kind of ping to determine the status of the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketHandle|SocketHandle( &amp;lt;socket&amp;gt; )]] -- Gets the operating system handle for the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIsBound|SocketIsBound( &amp;lt;socket&amp;gt; )]] -- Gets a value that indicates whether the &amp;lt;socket&amp;gt; is bound to a specific local port&lt;br /&gt;
* [[Core Function SocketOpt|SocketOpt( &amp;lt;socket&amp;gt;, &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt;  )]] -- Get or Set a setting on a &amp;lt;socket&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Misc Network Functions =====&lt;br /&gt;
* [[Core Function HostResolve|HostResolve( &amp;lt;host name&amp;gt; )]] -- Resolves a host name such as google.com into an IP address&lt;br /&gt;
* [[Core Function Ping|Ping( &amp;lt;ip address/host name&amp;gt; )]] -- Pings a host and returns the roundtrip-time&lt;br /&gt;
&lt;br /&gt;
==== Memory Functions ====&lt;br /&gt;
* [[Core Function Alloc|Alloc( &amp;lt;size&amp;gt;, &amp;lt;filler&amp;gt; )]] -- Allocate memory and return the pointer to it&lt;br /&gt;
* [[Core Function Realloc|Realloc( &amp;lt;ptr&amp;gt;, &amp;lt;size&amp;gt; )]] -- Resizes a block of memory previously allocated with Alloc()&lt;br /&gt;
* [[Core Function Free|Free( &amp;lt;ptr&amp;gt; )]] -- Deallocate memory from a pointer&lt;br /&gt;
* [[Core Function StringToPTR|StringToPTR( &amp;lt;type&amp;gt;, &amp;lt;string&amp;gt; )]] -- Allocates memory for the string and writes the string to that memory and returns the pointer for that memory&lt;br /&gt;
* [[Core Function PTRToString|PTRToString( &amp;lt;type&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a string from a memory pointer&lt;br /&gt;
* [[Core Function PTRRead|PTRRead( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Read data from a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRWrite|PTRWrite( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;value&amp;gt; )]] -- Write data to a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRToDLLStruct|PTRToDLLStruct( &amp;lt;def string&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a DLLStruct from a memory pointer&lt;br /&gt;
* [[Core Function DLLStructCreateDef|DLLStructCreateDef( &amp;lt;name&amp;gt;, &amp;lt;def string&amp;gt; )]] -- Creates a named C/C++ style structure definition that can be used with DLLStructCreate and can also be placed inside other DLLStructs&lt;br /&gt;
* [[Core Function DLLStructGetDef|DLLStructGetDef( &amp;lt;name&amp;gt;/&amp;lt;dllstruct&amp;gt; )]] -- Return the &amp;lt;def string&amp;gt; of a given DLLStruct&lt;br /&gt;
* [[Core Function DLLStructCreate|DLLStructCreate( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructCreateUnion|DLLStructCreateUnion( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure (union) to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructGetData|DLLStructGetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the data of an element of the struct&lt;br /&gt;
* [[Core Function DLLStructSetData|DLLStructSetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Set the data of an element of the struct&lt;br /&gt;
* [[Core Function DllStructGetSize|DLLStructGetSize( &amp;lt;dllstruct&amp;gt; )]] -- Returns the size of the struct in bytes&lt;br /&gt;
* [[Core Function DllStructGetPtr|DLLStructGetPtr( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the pointer to the struct or an element in the struct or even a specific index of an array object within an elment&lt;br /&gt;
* [[Core Function DllStructGetVars|DLLStructGetVars( &amp;lt;dllstruct&amp;gt; )]] -- Create an array of all items and their array size with total byte size&lt;br /&gt;
&lt;br /&gt;
==== Clipboard Functions ====&lt;br /&gt;
* [[Core Function ClipGet|ClipGet( &amp;lt;type&amp;gt; )]] -- Get data from the clipboard&lt;br /&gt;
* [[Core Function ClipSet|ClipSet( &amp;lt;type&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set data to the clipboard&lt;br /&gt;
&lt;br /&gt;
==== Registry Functions ====&lt;br /&gt;
* [[Core Function RegRead|RegRead( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;default&amp;gt; )]] -- Reads a value from the registry&lt;br /&gt;
* [[Core Function RegWrite|RegWrite( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Sets a value in the registry&lt;br /&gt;
* [[Core Function RegDelete|RegDelete( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Delete a key or value from the registry&lt;br /&gt;
* [[Core Function RegKeyList|RegKeyList( &amp;lt;key&amp;gt; )]] -- Return an array of all the keys at this location in the registry&lt;br /&gt;
* [[Core Function RegValueList|RegValueList( &amp;lt;key&amp;gt; )]] -- Return an array of all the values at this location in the registry&lt;br /&gt;
* [[Core Function RegKeyExists|RegKeyExists( &amp;lt;key&amp;gt; )]] -- Check if a key exists in the registry&lt;br /&gt;
* [[Core Function RegValueExists|RegValueExists( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a key value in the registry&lt;br /&gt;
&lt;br /&gt;
==== Time &amp;amp; Date Functions ====&lt;br /&gt;
* [[Core Function Time|Time( &amp;lt;array&amp;gt; )]] -- Returns the current time or calculates the time in seconds from an associative array&lt;br /&gt;
* [[Core Function MicroTime|MicroTime( &amp;lt;returnAsDouble&amp;gt; )]] -- Returns the current Unix timestamp with microseconds&lt;br /&gt;
* [[Core Function Date|Date( &amp;lt;format&amp;gt;, &amp;lt;time&amp;gt; )]] -- Returns a string with the date and time formatted according to the format given. If no time is supplied defaults to the current time&lt;br /&gt;
* [[Core Function TimerInit|TimerInit( )]] -- Returns a handle that can be passed to TimerDiff() to calculate the difference in milliseconds&lt;br /&gt;
* [[Core Function TimerDiff|TimerDiff( &amp;lt;handle&amp;gt; )]] -- Returns the difference in time from a previous call to TimerInit()&lt;br /&gt;
* [[Core Function Sleep|Sleep( &amp;lt;milliseconds&amp;gt;, &amp;lt;doEvents&amp;gt; )]] -- Pause the current executing thread for the given milliseconds&lt;br /&gt;
* [[Core Function USleep|USleep( &amp;lt;microseconds&amp;gt; )]] -- Pause the current executing thread for the given microseconds&lt;br /&gt;
* [[Core Function TickCount|TickCount( &amp;lt;ticks&amp;gt; )]] -- Retrieves the number of milliseconds that have elapsed since the current instance of Sputnik was started&lt;br /&gt;
&lt;br /&gt;
==== Old GUI Functions ====&lt;br /&gt;
&lt;br /&gt;
All the functions below are part of the SputnikOldGUI.dll basically these functions are *to be* depreciated and replaced with something much better in the future.&lt;br /&gt;
&lt;br /&gt;
However you can still use these and even after they have been replaced with a new GUI system you will still be able to use these functions (and GUI programs made with them) anyway by using the SputnikOldGUI.dll into your project.&lt;br /&gt;
&lt;br /&gt;
To use any of these functions you must include the SputnikOldGUI.dll to do that you must add this code to the top of your script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of using &amp;quot;GUICreate&amp;quot; in a full example and including the SputnikOldGUI.dll&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Load the old GUI system&lt;br /&gt;
// Since this an old GUI example&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
// Create the GUI&lt;br /&gt;
Global $GUI = GUICreate(&amp;quot;Window&amp;quot;, &amp;quot;My Title&amp;quot;, 200, 200);&lt;br /&gt;
// Create a button -- This button will simply display a message&lt;br /&gt;
Global $Button = GUICreate(&amp;quot;Button&amp;quot;, $GUI, &amp;quot;Press Me!&amp;quot;, 8, 8);&lt;br /&gt;
// Add a link to the button&lt;br /&gt;
GUILink($Button, &amp;quot;Click&amp;quot;, 'myFunction();'); // Call function&lt;br /&gt;
// Show the GUI&lt;br /&gt;
GUILoad( $GUI );&lt;br /&gt;
// Keep the GUI running as long as long as the window is open&lt;br /&gt;
While ( GUIStatus( $GUI ) ) &lt;br /&gt;
	DoEvents( ); &lt;br /&gt;
// This function is called when the button is clicked&lt;br /&gt;
Function myFunction()&lt;br /&gt;
{&lt;br /&gt;
	MsgBox(&amp;quot;Hello from the button&amp;quot;);&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make note however that the examples below do not include the SputnikOldGUI.dll in their scripts you must do that part yourself!.&lt;br /&gt;
&lt;br /&gt;
===== Dialog Creation Functions =====&lt;br /&gt;
* [[Core Function GUIMDICreate|GUICreate( &amp;quot;MDIWindow&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI Multi-Document-Interface window&lt;br /&gt;
* [[Core Function GUICreate|GUICreate( &amp;quot;Window&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI window&lt;br /&gt;
* [[Core Function DoEvents|DoEvents( )]] -- Keep GUI windows active by dispatching all messages in the queue&lt;br /&gt;
* [[Core Function GUILoad|GUILoad( &amp;lt;GUI Window&amp;gt; )]] -- Load a GUI window and display it (Usually after creation or after GUIUnload)&lt;br /&gt;
* [[Core Function GUIUnload|GUIUnload( &amp;lt;GUI Window&amp;gt; )]] -- Unload a GUI window and hide it (GUILoad will bring it back)&lt;br /&gt;
* [[Core Function GUIMDIParent|GUIMDIParent( &amp;lt;GUI Window&amp;gt;, &amp;lt;GUI Window&amp;gt; )]] -- Set the parent window (An MDI window) for another window to be created inside it&lt;br /&gt;
&lt;br /&gt;
===== Control Creation Functions =====&lt;br /&gt;
* [[Core Function GUICreateButton|GUICreate( &amp;quot;Button&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Button&lt;br /&gt;
* [[Core Function GUICreateDataGrid|GUICreate( &amp;quot;DataGrid&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DataGrid&lt;br /&gt;
* [[Core Function GUICreateTimer|GUICreate( &amp;quot;Timer&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Interval&amp;gt; )]] -- Create a Timer&lt;br /&gt;
* [[Core Function GUICreateComboBox|GUICreate( &amp;quot;ComboBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ComboBox&lt;br /&gt;
* [[Core Function GUICreateTextBox|GUICreate( &amp;quot;TextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TextBox&lt;br /&gt;
* [[Core Function GUICreateTextBoxEx|GUICreate( &amp;quot;TextBoxEx&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Multiline TextBox&lt;br /&gt;
* [[Core Function GUICreateLabel|GUICreate( &amp;quot;Label&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Label&lt;br /&gt;
* [[Core Function GUICreateGroupBox|GUICreate( &amp;quot;GroupBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a GroupBox&lt;br /&gt;
* [[Core Function GUICreatePictureBox|GUICreate( &amp;quot;PictureBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a PictureBox&lt;br /&gt;
* [[Core Function GUICreateProgressBar|GUICreate( &amp;quot;ProgressBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ProgressBar&lt;br /&gt;
* [[Core Function GUICreateListBox|GUICreate( &amp;quot;ListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListBox&lt;br /&gt;
* [[Core Function GUICreateContextMenu|GUICreate( &amp;quot;ContextMenu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Context Menu which is used when right clicking the object&lt;br /&gt;
* [[Core Function GUICreateMenu|GUICreate( &amp;quot;Menu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Menu&lt;br /&gt;
* [[Core Function GUICreateMenuItem|GUICreate( &amp;quot;MenuItem&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt; )]] -- Create a MenuItem&lt;br /&gt;
* [[Core Function GUICreateTabSheet|GUICreate( &amp;quot;TabSheet&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabSheet&lt;br /&gt;
* [[Core Function GUICreateTabPage|GUICreate( &amp;quot;TabPage&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabPage&lt;br /&gt;
* [[Core Function GUICreateRichTextBox|GUICreate( &amp;quot;RichTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RichTextBox&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Creates a source code editor textbox the same as the one used in the Sputnik IDE&lt;br /&gt;
* [[Core Function GUICreateCheckBox|GUICreate( &amp;quot;CheckBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckBox&lt;br /&gt;
* [[Core Function GUICreateRadioButton|GUICreate( &amp;quot;RadioButton&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RadioButton&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a textbox with syntax highlight and support for multiple and custom languages (Same thing Sputnik IDE uses)&lt;br /&gt;
* [[Core Function GUICreateHotkeyBox|GUICreate( &amp;quot;HotKeyBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a hotkeybox which a user can press a hotkey into it so you can make use of it&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function GUICreateDateTimePicker|GUICreate( &amp;quot;DateTimePicker&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DateTimePicker&lt;br /&gt;
* [[Core Function GUICreateLinkLabel|GUICreate( &amp;quot;LinkLabel&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a LinkLabel&lt;br /&gt;
* [[Core Function GUICreateCheckedListBox|GUICreate( &amp;quot;CheckedListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckedListBox&lt;br /&gt;
* [[Core Function GUICreateListView|GUICreate( &amp;quot;ListView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListView&lt;br /&gt;
* [[Core Function GUICreateMaskedTextBox|GUICreate( &amp;quot;MaskedTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MaskedTextBox&lt;br /&gt;
* [[Core Function GUICreateMonthCalendar|GUICreate( &amp;quot;MonthCalendar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MonthCalendar&lt;br /&gt;
* [[Core Function GUICreateNumericUpDown|GUICreate( &amp;quot;NumericUpDown&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a NumericUpDown&lt;br /&gt;
* [[Core Function GUICreateToolTip|GUICreate( &amp;quot;ToolTip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolTip&lt;br /&gt;
* [[Core Function GUICreateTreeView|GUICreate( &amp;quot;TreeView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TreeView&lt;br /&gt;
* [[Core Function GUICreateWebBrowser|GUICreate( &amp;quot;WebBrowser&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a WebBrowser&lt;br /&gt;
* [[Core Function GUICreateStatusBar|GUICreate( &amp;quot;StatusBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a StatusBar&lt;br /&gt;
* [[Core Function GUICreateToolStrip|GUICreate( &amp;quot;ToolStrip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolStrip&lt;br /&gt;
&lt;br /&gt;
===== Window/Control Properties Get/Set Functions =====&lt;br /&gt;
&lt;br /&gt;
Note - Any options not here are most likely found using GUIGetProp and GUISetProp the bulk of all props can be found/used in them 2 funtions however anything special and not generic will go in the functions below.&lt;br /&gt;
&lt;br /&gt;
* [[Core Function GUIWindow|GUIWindow( &amp;lt;window&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Windows&lt;br /&gt;
* [[Core Function GUIRichTextBox|GUIRichTextBox( &amp;lt;richtextbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RichTextBox&lt;br /&gt;
* [[Core Function GUIDataGrid|GUIDataGrid( &amp;lt;datagrid&amp;gt; )]] -- Properties &amp;amp; Functions specifically for DataGrid&lt;br /&gt;
* [[Core Function GUITimer|GUITimer( &amp;lt;timer&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Timer&lt;br /&gt;
* [[Core Function GUICodeBox|GUIComboBox( &amp;lt;codebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CodeBox&lt;br /&gt;
* [[Core Function GUIComboBox|GUIComboBox( &amp;lt;combobox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ComboBox&lt;br /&gt;
* [[Core Function GUICheckBox|GUICheckBox( &amp;lt;checkbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CheckBox&lt;br /&gt;
* [[Core Function GUIRadioButton|GUIRadioButton( &amp;lt;radiobutton&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RadioButton&lt;br /&gt;
* [[Core Function GUIHotkeyBox|GUIHotkeyBox( &amp;lt;hotkeybox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for HotkeyBox&lt;br /&gt;
* [[Core Function GUIListBox|GUIListBox( &amp;lt;listbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ListBox&lt;br /&gt;
* [[Core Function GUITabSheet|GUITabSheet( &amp;lt;tabsheet&amp;gt; )]] -- Properties &amp;amp; Functions specifically for TabSheet&lt;br /&gt;
* [[Core Function GUIProgressBar|GUIProgressBar( &amp;lt;progressbar&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ProgressBar&lt;br /&gt;
* [[Core Function GUIPictureBox|GUIPictureBox( &amp;lt;picturebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for PictureBox&lt;br /&gt;
* [[Core Function GUIMsgFilter|GUIMsgFilter( &amp;lt;gui object&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all messages windows sends to the GUI object (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
* [[Core Function GUIWndProc|GUIWndProc( &amp;lt;gui&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all the WindProc messages windows sends to the GUI window (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
&lt;br /&gt;
===== Common Dialog/Control Properties Get/Set Functions =====&lt;br /&gt;
* [[Core Function GUIGetProp|GUIGetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt; )]] -- Get the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUISetProp|GUISetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUIGetPropList|GUIGetPropList( &amp;lt;gui object&amp;gt;, &amp;lt;searchfor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get an array of the the names and types of all compatible/incompatible/all properties that the GUI object offers&lt;br /&gt;
&lt;br /&gt;
===== GUI Link (Event) Functions =====&lt;br /&gt;
* [[Core Function GUILink|GUILink( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt;, &amp;lt;action&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Add an event (link) to a GUI object such as Click, MouseDown etc&lt;br /&gt;
* [[Core Function GUILinkValid|GUILinkValid( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt; )]] -- Check if a given event (link) is valid for the given GUI object&lt;br /&gt;
&lt;br /&gt;
===== Graphics/Pixel Functions =====&lt;br /&gt;
* [[Core Function Colour|Colour( &amp;lt;name&amp;gt; )]] -- Get the colour INT value of a given colours name&lt;br /&gt;
* [[Core Function ColourDialog|ColourDialog( )]] -- Allows the user to select a colour and allows you to get the RED, GREEN, BLUE etc values&lt;br /&gt;
* [[Core Function FontDialog|FontDialog( &amp;lt;font&amp;gt; )]] -- Allows the user to select a font and allows you to get the Name, size, bold etc values&lt;br /&gt;
&lt;br /&gt;
===== Bitmap Functions =====&lt;br /&gt;
* [[Core Function BitmapCreate|BitmapCreate( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Create a new blank bitmap object&lt;br /&gt;
* [[Core Function BitmapGetPixel|BitmapGetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Get a pixel on a bitmap object&lt;br /&gt;
* [[Core Function BitmapSetPixel|BitmapSetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;colour&amp;gt; )]] -- Alter a pixel on a bitmap object&lt;br /&gt;
&lt;br /&gt;
===== Other GUI Functions =====&lt;br /&gt;
* [[Core Function GUIStatus|GUIStatus( &amp;lt;gui window&amp;gt; )]] -- Check if a GUI window is loaded or unloaded&lt;br /&gt;
* [[Core Function GUIHideCaret|GUIHideCaret( &amp;lt;gui object&amp;gt; )]] -- Hide the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIShowCaret|GUIShowCaret( &amp;lt;gui object&amp;gt; )]] -- Show the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIRedraw|GUIRedraw( &amp;lt;gui object&amp;gt; )]] -- Redraw the object&lt;br /&gt;
* [[Core Function GUICreateFont|GUICreate( &amp;quot;Font&amp;quot;, &amp;lt;name&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Create a Font&lt;br /&gt;
* [[Core Function MsgBox|MsgBox( &amp;lt;message&amp;gt;, &amp;lt;title&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Show a message dialog&lt;br /&gt;
* [[Core Function InputBox|InputBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input text&lt;br /&gt;
* [[Core Function InputBoxEx|InputBoxEx( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input multiple lines of text&lt;br /&gt;
* [[Core Function ChoiceBox|ChoiceBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows a window with choices for the user to pick from either none/one or many choices can be allowed&lt;br /&gt;
* [[Core Function ToolTip|ToolTip( &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Creates a tooltip anywhere on the screen&lt;br /&gt;
* [[Core Function ToolTipKill|ToolTipKill( &amp;lt;ToolTip&amp;gt; )]] -- Delete a tooltip that was made using ToolTip()&lt;br /&gt;
* [[Core Function PSet|PSet( &amp;lt;gui object&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;object&amp;gt; )]] -- Draw at a pixel&lt;br /&gt;
* [[Core Function GUISendToBack|GUISendToBack( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the back of the ZOrder&lt;br /&gt;
* [[Core Function GUIBringToFront|GUIBringToFront( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the front of the ZOrder&lt;br /&gt;
&lt;br /&gt;
===== Variable Type Checking etc =====&lt;br /&gt;
* [[Core Function isVarGUIObject|isVarGUIObject( $variable )]] -- Check if a variable holds a GUI Object&lt;br /&gt;
* [[Core Function GetVarGUIObjType|GetVarGUIObjType( $variable )]] -- Get the common object type of a variable (If it is a GUI object)&lt;br /&gt;
&lt;br /&gt;
==== Keyboard Control Functions ====&lt;br /&gt;
* [[Core Function HotKeySet|HotKeySet( &amp;lt;keydef&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Create a custom hotkey to run custom code or execute a function&lt;br /&gt;
* [[Core Function SendKeys|SendKeys( &amp;lt;keydef&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends simulated keystrokes to the active window&lt;br /&gt;
* [[Core Function RealGetKeyState|RealGetKeyState( &amp;lt;vk_keycode/expression&amp;gt; )]] -- Checks if a key or series of keys is pressed down&lt;br /&gt;
* [[Core Function KeyHook|KeyHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide Keyhook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Mouse Control Functions ====&lt;br /&gt;
* [[Core Function MouseClick|MouseClick ( &amp;lt;button&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click operation&lt;br /&gt;
* [[Core Function MouseClickDrag|MouseClickDrag ( &amp;lt;button&amp;gt;, &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click and drag operation&lt;br /&gt;
* [[Core Function MouseDown|MouseDown ( &amp;lt;button&amp;gt; )]] -- Perform a mouse down event at the current mouse position&lt;br /&gt;
* [[Core Function MouseUp|MouseUp ( &amp;lt;button&amp;gt; )]] -- Perform a mouse up event at the current mouse position&lt;br /&gt;
* [[Core Function MouseMove|MouseMove ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves the mouse pointer&lt;br /&gt;
* [[Core Function MouseGetPos|MouseGetPos ( )]] -- Retrieves the current position of the mouse cursor&lt;br /&gt;
* [[Core Function MouseWheel|MouseWheel ( &amp;lt;direction&amp;gt;, &amp;lt;clicks&amp;gt; )]] -- Moves the mouse wheel up or down&lt;br /&gt;
* [[Core Function MouseHook|MouseHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide MouseHook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Window Management Functions ====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function WinActivate|WinActivate ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Activates (gives focus to) a window&lt;br /&gt;
* [[Core Function WinActive|WinActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists and is currently active&lt;br /&gt;
* [[Core Function WinExists|WinExists ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists&lt;br /&gt;
* [[Core Function WinGetClassList|WinGetClassList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the classes from a window&lt;br /&gt;
* [[Core Function WinGetHandle|WinGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the internal handle of a window&lt;br /&gt;
* [[Core Function WinGetPos|WinGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the position and size of a given window&lt;br /&gt;
* [[Core Function WinGetCaretPos|WinGetCaretPos ( )]] -- Returns the coordinates of the caret in the foreground window&lt;br /&gt;
* [[Core Function WinGetTitle|WinGetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the full title from a window&lt;br /&gt;
* [[Core Function WinGetText|WinGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the text from a window&lt;br /&gt;
* [[Core Function WinGetState|WinGetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the state of a given window&lt;br /&gt;
* [[Core Function WinGetProcess|WinGetProcess ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the Process ID (PID) associated with a window&lt;br /&gt;
* [[Core Function WinGetClientSize|WinGetClientSize ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the size of a given window's client area&lt;br /&gt;
* [[Core Function WinClose|WinClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Closes a window&lt;br /&gt;
* [[Core Function WinKill|WinKill ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Forces a window to close&lt;br /&gt;
* [[Core Function WinMove|WinMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves and/or resizes a window&lt;br /&gt;
* [[Core Function WinWait|WinWait ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window exists&lt;br /&gt;
* [[Core Function WinWaitActive|WinWaitActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is active&lt;br /&gt;
* [[Core Function WinWaitNotActive|WinWaitNotActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is not active&lt;br /&gt;
* [[Core Function WinWaitClose|WinWaitClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window does not exist&lt;br /&gt;
* [[Core Function WinSetTitle|WinSetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;newtitle&amp;gt; )]] -- Changes the title of a window&lt;br /&gt;
* [[Core Function WinSetState|WinSetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows, hides, minimizes, maximizes, or restores a window&lt;br /&gt;
* [[Core Function WinSetTrans|WinSetTrans ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;transparency&amp;gt; )]] -- Sets the transparency of a window&lt;br /&gt;
* [[Core Function WinMinimizeAll|WinMinimizeAll  ( )]] -- Minimizes all windows&lt;br /&gt;
* [[Core Function WinMinimizeAllUndo|WinMinimizeAllUndo ( )]] -- Undoes a previous WinMinimizeAll function&lt;br /&gt;
* [[Core Function WinFlash|WinFlash ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flashes&amp;gt;, &amp;lt;delay&amp;gt; )]] -- Flashes a window in the taskbar&lt;br /&gt;
* [[Core Function WinMenuSelectItem|WinMenuSelectItem( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;item&amp;gt;, &amp;lt;subitems&amp;gt; ... )]] -- Invokes a menu item of a window&lt;br /&gt;
* [[Core Function WinList|WinList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves a list of windows&lt;br /&gt;
&lt;br /&gt;
===== Controls =====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ControlClick|ControlClick ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;button&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Sends a mouse click command to a given control&lt;br /&gt;
* [[Core Function ControlSend|ControlSend ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;string&amp;gt; &amp;lt;flag&amp;gt; )]] -- Sends a string of characters to a control&lt;br /&gt;
* [[Core Function ControlGetFocus|ControlGetFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Returns the ControlRef# of the control that has keyboard focus within a specified window&lt;br /&gt;
* [[Core Function ControlGetPos|ControlGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the position and size of a control relative to it's window&lt;br /&gt;
* [[Core Function ControlDisable|ControlDisable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Disables a control&lt;br /&gt;
* [[Core Function ControlEnable|ControlEnable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Enables a control&lt;br /&gt;
* [[Core Function ControlShow|ControlShow ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Shows a control that was hidden&lt;br /&gt;
* [[Core Function ControlHide|ControlHide ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Hides a control&lt;br /&gt;
* [[Core Function ControlGetText|ControlGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves text from a control&lt;br /&gt;
* [[Core Function ControlSetText|ControlSetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;text&amp;gt; )]] -- Sets text of a control&lt;br /&gt;
* [[Core Function ControlMove|ControlMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves a control within a window&lt;br /&gt;
* [[Core Function ControlGetHandle|ControlGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the internal handle of a control&lt;br /&gt;
* [[Core Function ControlFocus|ControlFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Sets input focus to a given control on a window&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function ControlCommand|ControlCommand ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;option&amp;gt; )]] -- Sends a command to a control&lt;br /&gt;
&lt;br /&gt;
==== Graphics/Pixel Functions ====&lt;br /&gt;
* [[Core Function PixelGetColour|PixelGetColour ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Returns a pixel colour according to x, y pixel coordinates&lt;br /&gt;
* [[Core Function PixelGetMouse|PixelGetMouse ( )]] -- Returns a pixel colour according to x, y position of the mouse pointer&lt;br /&gt;
* [[Core Function PixelSearch|PixelSearch ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelSearchHWND|PixelSearchHWND ( &amp;lt;hwnd&amp;gt;, &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelChecksum|PixelChecksum ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;step&amp;gt;, &amp;lt;hwnd&amp;gt; )]] -- Generates a checksum for a region of pixels&lt;br /&gt;
* [[Core Function RGB|RGB( &amp;lt;red&amp;gt;, &amp;lt;green&amp;gt;, &amp;lt;blue&amp;gt; )]] -- Get the colour INT value of given red, green and blue bytes&lt;br /&gt;
* [[Core Function GetRValue|GetRValue( &amp;lt;colour&amp;gt; )]] -- Get the red byte from a colour INT value&lt;br /&gt;
* [[Core Function GetGValue|GetGValue( &amp;lt;colour&amp;gt; )]] -- Get the green byte from a colour INT value&lt;br /&gt;
* [[Core Function GetBValue|GetBValue( &amp;lt;colour&amp;gt; )]] -- Get the blue byte from a colour INT value&lt;br /&gt;
&lt;br /&gt;
==== Sputnik Plugins (Using .NET DLLs) ====&lt;br /&gt;
* [[Core Function Use|Use( &amp;lt;name/array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Load a Sputnik plugin&lt;br /&gt;
* [[Core Function Unuse|Unuse( &amp;lt;name&amp;gt; )]] -- ???&lt;br /&gt;
&lt;br /&gt;
==== Control Flow Functions ====&lt;br /&gt;
* [[Core Function Return|Return &amp;lt;expressions&amp;gt;]] -- Immediately ends execution of the current function, and returns its argument as the value of the function call. return will also end the execution of an Eval() statement or script file&lt;br /&gt;
* [[Core Function Throw|Throw( &amp;lt;expression&amp;gt; )]] -- Throw an exception&lt;br /&gt;
* [[Core Function Die|Die( &amp;lt;expression&amp;gt; )]] -- Gives an error and terminates the program&lt;br /&gt;
* [[Core Function Break|Break( &amp;lt;scopes&amp;gt; )]] -- Ends execution of the current loop&lt;br /&gt;
* [[Core Function Continue|Continue( &amp;lt;scopes&amp;gt; )]] -- Continue the execution of a loop at its next iteration&lt;br /&gt;
* [[Core Function Redo|Redo( )]] -- Continue the execution of a loop at the start of the current iteration&lt;br /&gt;
&lt;br /&gt;
==== Internal Class Management and Information ====&lt;br /&gt;
* [[Core Function ClassExists|ClassExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Class exists&lt;br /&gt;
* [[Core Function ClassList|ClassList( &amp;lt;expression&amp;gt;, &amp;lt;inherits&amp;gt; )]] -- Return an array of all user defined classes (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function ClassInfo|ClassInfo( &amp;lt;class-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* [[Core Function ClassStack|ClassStack( &amp;lt;variable&amp;gt; )]] -- Return a reference to a classes internal variable stack (as an array) (or set the class stack from an existing array)&lt;br /&gt;
* [[Core Function ClassName|ClassName( &amp;lt;variable&amp;gt; )]] -- Return the name of the class on a variable or a class this code is running inside of (automatically uses $this if no param is given)&lt;br /&gt;
* [[Core Function UnsetClass|UnsetClass( &amp;lt;class-name&amp;gt; )]] -- Delete a previous user defined Class from Sputnik&lt;br /&gt;
* [[Core Function New|New( &amp;lt;classConstruction&amp;gt; )]] -- Create a new instance of a given class name optionally with parameters to be sent to the __Construct function of the new class&lt;br /&gt;
* [[Core Function NewClass|newClass( &amp;lt;name&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a new instance of a class by its name as a string&lt;br /&gt;
* [[Core Function NewClassFromArray|NewClassFromArray( &amp;lt;name&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and an array of its values&lt;br /&gt;
* [[Core Function ConvertClass|ConvertClass( &amp;lt;oldClass&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and copy the values from another class&lt;br /&gt;
* [[Core Function IsOverloaded|IsOverloaded( &amp;lt;class&amp;gt;, &amp;lt;overload&amp;gt; )]] -- Check if a given cast/operator overload exists within a class&lt;br /&gt;
&lt;br /&gt;
==== Internal Function Management and Information ====&lt;br /&gt;
* [[Core Function FunctionExists|FunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Function exists&lt;br /&gt;
* [[Core Function FunctionList|FunctionList( &amp;lt;expression&amp;gt;, &amp;lt;class&amp;gt; )]] -- Return an array of all user defined functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function FunctionInfo|FunctionInfo( &amp;lt;function-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a function&lt;br /&gt;
* [[Core Function UnsetFunction|UnsetFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a previous user defined Function from Sputnik&lt;br /&gt;
* [[Core Function UnsetCoreFunction|UnsetCoreFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a core function from Sputnik&lt;br /&gt;
* [[Core Function CoreFunctionExists|CoreFunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Core Function exists&lt;br /&gt;
* [[Core Function CoreFunctionList|CoreFunctionList( &amp;lt;expression&amp;gt; )]] -- Return an array of all core functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function Eval|Eval( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;cleanup&amp;gt;, &amp;lt;printToReturn&amp;gt; )]] -- Evaluate a string as Sputnik code&lt;br /&gt;
* [[Core Function MKFunc|MKFunc(&amp;lt;params&amp;gt;, &amp;lt;body&amp;gt;)]] -- Create a user defined function to be called from a variable&lt;br /&gt;
* [[Core Function CallFunc|CallFunc( &amp;lt;function&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a user defined function contained in a variable&lt;br /&gt;
* [[Core Function Call|Call(&amp;lt;function/array&amp;gt;, &amp;lt;expressions&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
* [[Core Function CallArray|CallArray( &amp;lt;function/array&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
&lt;br /&gt;
==== Internal Enum Management and Information ====&lt;br /&gt;
* [[Core Function EnumExists|EnumExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Enum exists&lt;br /&gt;
* [[Core Function EnumList|EnumList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined enums (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetEnum|UnsetEnum( &amp;lt;enum-name&amp;gt; )]] -- Delete a previous user defined Enum from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLImport Management and Information ====&lt;br /&gt;
* [[Core Function DLLImportExists|DLLImportExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLImport exists&lt;br /&gt;
* [[Core Function DLLImportList|DLLImportList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllimports (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLImport|UnsetDLLImport( &amp;lt;dllimport-function-name&amp;gt; )]] -- Delete a function imported using the DLLImport() function&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLStruct Management and Information ====&lt;br /&gt;
* [[Core Function DLLStructExists|DLLStructExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLStruct exists&lt;br /&gt;
* [[Core Function DLLStructList|DLLStructList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllstructs (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLStruct|UnsetDLLStruct( &amp;lt;dllstruct-name&amp;gt; )]] -- Delete a previous user defined DLLStruct from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal Variable/Scope Information ====&lt;br /&gt;
* [[Core Function VarList|VarList( &amp;lt;varScope/class&amp;gt; )]] -- Obtain information on all variables that exist in a given scope or class&lt;br /&gt;
* [[Core Function VarTypeToString|VarTypeToString( &amp;lt;varType&amp;gt; )]] -- Convert a raw variable type into it's string representation&lt;br /&gt;
* [[Core Function VarTypeFromString|VarTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarObjTypeToString|VarObjTypeToString( &amp;lt;varObjType&amp;gt; )]] -- Convert a raw variable object type into it's string representation&lt;br /&gt;
* [[Core Function VarObjTypeFromString|VarObjTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable object type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarScopeToString|VarScopeToString( &amp;lt;varScope&amp;gt; )]] -- Convert a raw variable scope into it's string representation&lt;br /&gt;
* [[Core Function VarScopeFromString|VarScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable scope from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function ScopeToString|ScopeToString( &amp;lt;scope&amp;gt; )]] -- Convert a raw scope into it's string representation&lt;br /&gt;
* [[Core Function ScopeFromString|ScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a scope from it's string representation into it's raw type&lt;br /&gt;
&lt;br /&gt;
==== Eval Functions ====&lt;br /&gt;
* [[Core Function EvalSyntax|EvalSyntax( &amp;lt;expression&amp;gt; )]] -- Evaluate a string as Sputnik code but only check if it's syntax is valid&lt;br /&gt;
* [[Core Function EvalCreate|EvalCreate( )]] -- Create an Eval object for use with Eval()&lt;br /&gt;
* [[Core Function EvalSet|EvalSet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a variable inside an Eval Object&lt;br /&gt;
* [[Core Function EvalGet|EvalGet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get a from variable inside an Eval Object&lt;br /&gt;
&lt;br /&gt;
==== Misc Functions ====&lt;br /&gt;
* [[Core Function Exit|Exit( &amp;lt;exitCode&amp;gt; )]] -- Instantly terminate the program/script&lt;br /&gt;
* [[Core Function Assert|Assert( &amp;lt;toCheck&amp;gt;, &amp;lt;errorMsg&amp;gt; )]] -- Check if value is true (if so returns it) if it is not then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* [[Core Function Warn|Warn( &amp;lt;message&amp;gt; )]] -- Show a warning message with source file name and line number&lt;br /&gt;
* [[Core Function Clone|Clone( &amp;lt;object&amp;gt; )]] -- Create a clone of a clone-able object&lt;br /&gt;
* [[Core Function LineInfo|LineInfo( )]] -- Get a vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* [[Core Function GC|GC( &amp;lt;flag&amp;gt; )]] -- Use the garbage collector&lt;br /&gt;
* [[Core Function HWND|HWND( )]] -- Get the HWND of the hidden window used by this program (It handles hotkeys etc)&lt;br /&gt;
* [[Core Function Require|Require( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use&lt;br /&gt;
* [[Core Function Include|Include( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use and execute all expressions&lt;br /&gt;
* [[Core Function Opt|Opt( &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt; )]] -- Changes the operation of various Sputnik functions/parameters&lt;br /&gt;
* [[Core Function IsAdmin|IsAdmin( )]] -- Check if the script is running in admin mode or not (Run as administrator)&lt;br /&gt;
* [[Core Function ObjToVar|ObjToVar( &amp;lt;variable&amp;gt; )]] -- Convert a $variable's object to its compatible $variable data type&lt;br /&gt;
* [[Core Function VarToObj|VarToObj( &amp;lt;variable&amp;gt; )]] -- Convert a $variable to its compatible object (such as .NET base object)&lt;br /&gt;
&lt;br /&gt;
=== User Defined Functions ===&lt;br /&gt;
&lt;br /&gt;
These functions are created using Sputnik and are not part of the Sputnik core language.&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2015-09-24T00:45:32Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.33 @ 20-09-2015 05:55PM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.34 @ 24-09-2015 05:45 AM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.33 @ 20-09-2015 05:55 PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2015-09-24T00:45:20Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.33 @ 20-09-2015 05:55PM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.34 @ 24-09-2015 05:45 AM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.33 @ 20-09-2015 05:55PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Main_Page"/>
				<updated>2015-09-24T00:33:28Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik Programming Language ==&lt;br /&gt;
&lt;br /&gt;
* [[What is Sputnik|What is Sputnik?]]&lt;br /&gt;
* [[The Team|The Team]]&lt;br /&gt;
* [[Language Reference|Language Reference]]&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
* [[Class Reference|Class Reference]]&lt;br /&gt;
* [[Version History|Version History]]&lt;br /&gt;
&lt;br /&gt;
Warning; Information on the wiki may not always be accurate to current downloadable version of Sputnik.&lt;br /&gt;
&lt;br /&gt;
However effort is taken to keep Sputnik compatible with older versions and any changes to that are for the better good overall.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
&lt;br /&gt;
[http://ubersoft.org/download/Sputnik34.rar Sputnik 0.34]&lt;br /&gt;
&lt;br /&gt;
(Extract download with [http://www.rarlab.com/download.htm WinRAR] 5.0 or higher)&lt;br /&gt;
&lt;br /&gt;
=== Contact ===&lt;br /&gt;
&lt;br /&gt;
UberFoX - Lead Programmer&lt;br /&gt;
&lt;br /&gt;
[mailto:uberfox@hotmail.com uberfox@hotmail.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Intro]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_DLLStructCreate</id>
		<title>Core Function DLLStructCreate</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_DLLStructCreate"/>
				<updated>2015-09-22T07:12:11Z</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;
DLLStructCreate( &amp;lt;def string&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Creates a C/C++ style structure to be used with DLLCall&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== def string  ====&lt;br /&gt;
&lt;br /&gt;
A string representing the structure to create (See Remarks).&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success - Returns the DLLStruct.&lt;br /&gt;
&lt;br /&gt;
Failure - Returns null and most likely throws exception.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
To delete a DLLStruct you must unset it example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
unset( $dllStruct );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note - If you do not unset the DLLStruct and instead just change the value of the variable then the garbage collector will deal with the DLLStruct *evenutally* but that could be today, tomorrow you never know so always unset() the struct when your finished with it.&lt;br /&gt;
&lt;br /&gt;
==== DEFS ====&lt;br /&gt;
&lt;br /&gt;
Each data type must be separated by a semi-colon ';'.&lt;br /&gt;
&lt;br /&gt;
Create arrays by adding '[size]' after the data type.&lt;br /&gt;
&lt;br /&gt;
DllStructCreate(&amp;quot;int;char[128]&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
An elementname can be added similar to a C-style declaration DllStructCreate(&amp;quot;int n;char buffer[128]&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If the definition begins with &amp;quot;union &amp;quot; you will create the struct the same as a C union type example:&lt;br /&gt;
$a = DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
def string settings&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[TYPE]		[WHAT IT RETURNS WITH DLLSTRUCTGETDATA]		[WHAT IS IT IN C++]&lt;br /&gt;
ubyte		unsigned 8 bit integer				unsigned char&lt;br /&gt;
byte		signed 8 bit integer				char&lt;br /&gt;
char		a single ASCII character			char&lt;br /&gt;
wchar		a single UNICODE character			wchar&lt;br /&gt;
short		signed 16 bit integer				short&lt;br /&gt;
int16		signed 16 bit integer				short&lt;br /&gt;
int		signed 32 bit integer				int&lt;br /&gt;
int32		signed 32 bit integer				int&lt;br /&gt;
int64		signed 64 bit integer				__int64&lt;br /&gt;
long		signed 64 bit integer				__int64&lt;br /&gt;
ushort		signed unsigned 16 bit integer			unsigned short&lt;br /&gt;
uint16		signed unsigned 16 bit integer			unsigned short&lt;br /&gt;
uint		signed unsigned 32 bit integer			unsigned int&lt;br /&gt;
uint32		signed unsigned 32 bit integer			unsigned int&lt;br /&gt;
uint64		signed unsigned 64 bit integer			unsigned __int64&lt;br /&gt;
ulong		signed unsigned 64 bit integer			unsigned __int64&lt;br /&gt;
float		signed 32 bit floating point			float&lt;br /&gt;
double		signed 64 bit floating point			double&lt;br /&gt;
char*		a pointer to an ASCII char array (string)	char*&lt;br /&gt;
wchar*		a pointer to an UNICODE char array (string)	wchar*&lt;br /&gt;
ptr		a pointer					void*&lt;br /&gt;
uptr		a unsigned pointer				unsigned void*&lt;br /&gt;
&lt;br /&gt;
Note - There is no *string* type instead;&lt;br /&gt;
You must create an array of chars example &amp;quot;char mystring[500]&amp;quot;&lt;br /&gt;
then you can use it like a string.&lt;br /&gt;
&lt;br /&gt;
Or if you wish to use UNICODE its &amp;quot;wchar mystring[500]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Remember to free() etc when your working with allocated memory and pointers.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Example of placing DLLStructs inside DLLStructs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a POINT struc to include in our main struct&lt;br /&gt;
DLLStructCreateDef(&amp;quot;POINT&amp;quot;, &amp;quot;int x;int y&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Create the struct&lt;br /&gt;
my $Struct = DLLStructCreate(	// Of course @&amp;quot;&amp;quot; makes producing the struct almost identical to C/C++&lt;br /&gt;
				@&amp;quot;&lt;br /&gt;
				int i;&lt;br /&gt;
				char* name;&lt;br /&gt;
				char* pass;&lt;br /&gt;
				char* id[3];&lt;br /&gt;
				POINT loc;&lt;br /&gt;
				POINT lastLoc;&lt;br /&gt;
				int j;&lt;br /&gt;
				&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
// Write the data&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;i&amp;quot;, 100);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;j&amp;quot;, 200);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;name&amp;quot;, &amp;quot;Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;pass&amp;quot;, &amp;quot;Another Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 0&amp;quot;, 0);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 1&amp;quot;, 1);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 2&amp;quot;, 2);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;loc-&amp;gt;x&amp;quot;, 50);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;loc-&amp;gt;y&amp;quot;, 70);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;lastLoc-&amp;gt;x&amp;quot;, 11);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;lastLoc-&amp;gt;y&amp;quot;, 22);&lt;br /&gt;
 &lt;br /&gt;
// Print the data&lt;br /&gt;
println( &amp;quot;I = &amp;quot; . DLLStructGetData($Struct, &amp;quot;i&amp;quot;) );&lt;br /&gt;
println( &amp;quot;J = &amp;quot; . DLLStructGetData($Struct, &amp;quot;j&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Name = &amp;quot; . DLLStructGetData($Struct, &amp;quot;name&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Pass = &amp;quot; . DLLStructGetData($Struct, &amp;quot;pass&amp;quot;) );&lt;br /&gt;
println( &amp;quot;ID 0 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 0) );&lt;br /&gt;
println( &amp;quot;ID 1 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 1) );&lt;br /&gt;
println( &amp;quot;ID 2 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 2) );&lt;br /&gt;
println( &amp;quot;Loc-&amp;gt;x = &amp;quot; . DLLStructGetData($Struct, &amp;quot;loc-&amp;gt;x&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Loc-&amp;gt;y = &amp;quot; . DLLStructGetData($Struct, &amp;quot;loc-&amp;gt;y&amp;quot;) );&lt;br /&gt;
println( &amp;quot;lastLoc-&amp;gt;x = &amp;quot; . DLLStructGetData($Struct, &amp;quot;lastLoc-&amp;gt;x&amp;quot;) );&lt;br /&gt;
println( &amp;quot;lastLoc-&amp;gt;y = &amp;quot; . DLLStructGetData($Struct, &amp;quot;lastLoc-&amp;gt;y&amp;quot;) );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but with more structs inside structs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a SIZE struc to include in the POINT struct&lt;br /&gt;
DLLStructCreateDef(&amp;quot;SIZE&amp;quot;, &amp;quot;int width;int height&amp;quot;);&lt;br /&gt;
// Define a POINT struc to include in our main struct&lt;br /&gt;
DLLStructCreateDef(&amp;quot;POINT&amp;quot;, &amp;quot;int x;int y;SIZE s&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
// Create the struct&lt;br /&gt;
my $Struct = DLLStructCreate(	// Of course @&amp;quot;&amp;quot; makes producing the struct almost identical to C/C++&lt;br /&gt;
				@&amp;quot;&lt;br /&gt;
				int i;&lt;br /&gt;
				char* name;&lt;br /&gt;
				char* pass;&lt;br /&gt;
				char* id[3];&lt;br /&gt;
				POINT loc;&lt;br /&gt;
				POINT lastLoc;&lt;br /&gt;
				int j;&lt;br /&gt;
				&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
// Write the data&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;i&amp;quot;, 100);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;j&amp;quot;, 200);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;name&amp;quot;, &amp;quot;Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;pass&amp;quot;, &amp;quot;Another Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 0&amp;quot;, 0);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 1&amp;quot;, 1);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 2&amp;quot;, 2);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;loc-&amp;gt;x&amp;quot;, 50);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;loc-&amp;gt;y&amp;quot;, 70);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;loc-&amp;gt;s-&amp;gt;width&amp;quot;, 800);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;loc-&amp;gt;s-&amp;gt;height&amp;quot;, 600);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;lastLoc-&amp;gt;x&amp;quot;, 11);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;lastLoc-&amp;gt;y&amp;quot;, 22);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;lastLoc-&amp;gt;s-&amp;gt;width&amp;quot;, 640);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;lastLoc-&amp;gt;s-&amp;gt;height&amp;quot;, 480);&lt;br /&gt;
 &lt;br /&gt;
// Print the data&lt;br /&gt;
println( &amp;quot;I = &amp;quot; . DLLStructGetData($Struct, &amp;quot;i&amp;quot;) );&lt;br /&gt;
println( &amp;quot;J = &amp;quot; . DLLStructGetData($Struct, &amp;quot;j&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Name = &amp;quot; . DLLStructGetData($Struct, &amp;quot;name&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Pass = &amp;quot; . DLLStructGetData($Struct, &amp;quot;pass&amp;quot;) );&lt;br /&gt;
println( &amp;quot;ID 0 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 0) );&lt;br /&gt;
println( &amp;quot;ID 1 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 1) );&lt;br /&gt;
println( &amp;quot;ID 2 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 2) );&lt;br /&gt;
println( &amp;quot;Loc-&amp;gt;x = &amp;quot; . DLLStructGetData($Struct, &amp;quot;loc-&amp;gt;x&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Loc-&amp;gt;y = &amp;quot; . DLLStructGetData($Struct, &amp;quot;loc-&amp;gt;y&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Loc-&amp;gt;s-&amp;gt;width = &amp;quot; . DLLStructGetData($Struct, &amp;quot;Loc-&amp;gt;s-&amp;gt;width&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Loc-&amp;gt;s-&amp;gt;height = &amp;quot; . DLLStructGetData($Struct, &amp;quot;Loc-&amp;gt;s-&amp;gt;height&amp;quot;) );&lt;br /&gt;
println( &amp;quot;lastLoc-&amp;gt;x = &amp;quot; . DLLStructGetData($Struct, &amp;quot;lastLoc-&amp;gt;x&amp;quot;) );&lt;br /&gt;
println( &amp;quot;lastLoc-&amp;gt;y = &amp;quot; . DLLStructGetData($Struct, &amp;quot;lastLoc-&amp;gt;y&amp;quot;) );&lt;br /&gt;
println( &amp;quot;lastLoc-&amp;gt;s-&amp;gt;width = &amp;quot; . DLLStructGetData($Struct, &amp;quot;lastLoc-&amp;gt;s-&amp;gt;width&amp;quot;) );&lt;br /&gt;
println( &amp;quot;lastLoc-&amp;gt;s-&amp;gt;height = &amp;quot; . DLLStructGetData($Struct, &amp;quot;lastLoc-&amp;gt;s-&amp;gt;height&amp;quot;) );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of placing DLLStructs inside DLLStructs inside DLLStructs and so on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a POINT struct&lt;br /&gt;
DLLStructCreateDef(&amp;quot;POINT&amp;quot;, &amp;quot;int x;int y&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Create a RECT struct that contains POINT structs&lt;br /&gt;
DLLStructCreateDef(&amp;quot;RECT&amp;quot;, &amp;quot;POINT pos;POINT size&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Create the main struct that will incluyde a RECT struct&lt;br /&gt;
my $Struct = DLLStructCreate(	// Of course @&amp;quot;&amp;quot; makes producing the struct almost identical to C/C++&lt;br /&gt;
				@&amp;quot;&lt;br /&gt;
				int i;&lt;br /&gt;
				char* name;&lt;br /&gt;
				char* pass;&lt;br /&gt;
				char* id[3];&lt;br /&gt;
				RECT r;&lt;br /&gt;
				int j;&lt;br /&gt;
				&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
// Write the data&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;i&amp;quot;, 100);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;j&amp;quot;, 200);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;name&amp;quot;, &amp;quot;Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;pass&amp;quot;, &amp;quot;Another Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 0&amp;quot;, 0);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 1&amp;quot;, 1);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 2&amp;quot;, 2);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;r-&amp;gt;pos-&amp;gt;x&amp;quot;, 50);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;r-&amp;gt;pos-&amp;gt;y&amp;quot;, 70);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;r-&amp;gt;size-&amp;gt;x&amp;quot;, 11);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;r-&amp;gt;size-&amp;gt;y&amp;quot;, 22);&lt;br /&gt;
 &lt;br /&gt;
// Print the data&lt;br /&gt;
println( &amp;quot;I = &amp;quot; . DLLStructGetData($Struct, &amp;quot;i&amp;quot;) );&lt;br /&gt;
println( &amp;quot;J = &amp;quot; . DLLStructGetData($Struct, &amp;quot;j&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Name = &amp;quot; . DLLStructGetData($Struct, &amp;quot;name&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Pass = &amp;quot; . DLLStructGetData($Struct, &amp;quot;pass&amp;quot;) );&lt;br /&gt;
println( &amp;quot;ID 0 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 0) );&lt;br /&gt;
println( &amp;quot;ID 1 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 1) );&lt;br /&gt;
println( &amp;quot;ID 2 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 2) );&lt;br /&gt;
println( &amp;quot;r-&amp;gt;pos-&amp;gt;x = &amp;quot; . DLLStructGetData($Struct, &amp;quot;r-&amp;gt;pos-&amp;gt;x&amp;quot;) );&lt;br /&gt;
println( &amp;quot;r-&amp;gt;pos-&amp;gt;y = &amp;quot; . DLLStructGetData($Struct, &amp;quot;r-&amp;gt;pos-&amp;gt;y&amp;quot;) );&lt;br /&gt;
println( &amp;quot;r-&amp;gt;size-&amp;gt;x = &amp;quot; . DLLStructGetData($Struct, &amp;quot;r-&amp;gt;size-&amp;gt;x&amp;quot;) );&lt;br /&gt;
println( &amp;quot;r-&amp;gt;size-&amp;gt;y = &amp;quot; . DLLStructGetData($Struct, &amp;quot;r-&amp;gt;size-&amp;gt;y&amp;quot;) );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example on using the struct with char* and even char* [] array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create the struct&lt;br /&gt;
my $Struct = DLLStructCreate(	// Of course @&amp;quot;&amp;quot; makes producing the struct almost identical to C/C++&lt;br /&gt;
				@&amp;quot;&lt;br /&gt;
				int i;&lt;br /&gt;
				char* name;&lt;br /&gt;
				char* pass;&lt;br /&gt;
				char* id[3];&lt;br /&gt;
				int j;&lt;br /&gt;
				&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Write the data&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;i&amp;quot;, 100);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;j&amp;quot;, 200);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;name&amp;quot;, &amp;quot;Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;pass&amp;quot;, &amp;quot;Another Testy&amp;quot;);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 0&amp;quot;, 0);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 1&amp;quot;, 1);&lt;br /&gt;
DLLStructSetData($Struct, &amp;quot;id&amp;quot;, &amp;quot;This is ID 2&amp;quot;, 2);&lt;br /&gt;
&lt;br /&gt;
// Print the data&lt;br /&gt;
println( &amp;quot;I = &amp;quot; . DLLStructGetData($Struct, &amp;quot;i&amp;quot;) );&lt;br /&gt;
println( &amp;quot;J = &amp;quot; . DLLStructGetData($Struct, &amp;quot;j&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Name = &amp;quot; . DLLStructGetData($Struct, &amp;quot;name&amp;quot;) );&lt;br /&gt;
println( &amp;quot;Pass = &amp;quot; . DLLStructGetData($Struct, &amp;quot;pass&amp;quot;) );&lt;br /&gt;
println( &amp;quot;ID 0 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 0) );&lt;br /&gt;
println( &amp;quot;ID 1 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 1) );&lt;br /&gt;
println( &amp;quot;ID 2 = &amp;quot; . DLLStructGetData($Struct, &amp;quot;id&amp;quot;, 2) );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*=========================================================&lt;br /&gt;
   Create the struct&lt;br /&gt;
   struct {&lt;br /&gt;
       int             var1;&lt;br /&gt;
       unsigned char   var2;&lt;br /&gt;
       unsigned int    var3;&lt;br /&gt;
       char            var4[128];&lt;br /&gt;
   }&lt;br /&gt;
=========================================================*/&lt;br /&gt;
&lt;br /&gt;
$str		= &amp;quot;int var1;ubyte var2;uint var3;char var4[128]&amp;quot;;&lt;br /&gt;
$a			= DllStructCreate($str);&lt;br /&gt;
if ( !$a )&lt;br /&gt;
{&lt;br /&gt;
	MsgBox(&amp;quot;Error in DllStructCreate&amp;quot;);&lt;br /&gt;
	exit();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*=========================================================&lt;br /&gt;
	Set data in the struct&lt;br /&gt;
	struct.var1	= -1;&lt;br /&gt;
	struct.var2	= 255;&lt;br /&gt;
	struct.var3	= 777;&lt;br /&gt;
	strcpy(struct.var4,&amp;quot;Hello&amp;quot;);&lt;br /&gt;
	struct.var4[0]	= 'h';&lt;br /&gt;
=========================================================*/&lt;br /&gt;
DllStructSetData($a,&amp;quot;var1&amp;quot;,-1);&lt;br /&gt;
DllStructSetData($a,&amp;quot;var2&amp;quot;,255);&lt;br /&gt;
DllStructSetData($a,&amp;quot;var3&amp;quot;,777);&lt;br /&gt;
DllStructSetData($a,&amp;quot;var4&amp;quot;,&amp;quot;Hello&amp;quot;);&lt;br /&gt;
DllStructSetData($a,&amp;quot;var4&amp;quot;,&amp;quot;G&amp;quot;,0);&lt;br /&gt;
&lt;br /&gt;
/*=========================================================&lt;br /&gt;
	Display info in the struct&lt;br /&gt;
;=========================================================*/&lt;br /&gt;
MsgBox(&amp;quot;Struct Size: &amp;quot; . DllStructGetSize($a) . @CRLF .&lt;br /&gt;
		&amp;quot;Struct pointer: &amp;quot; . DllStructGetPtr($a) . @CRLF .&lt;br /&gt;
		&amp;quot;Data:&amp;quot; . @CRLF .&lt;br /&gt;
		DllStructGetData($a,&amp;quot;var1&amp;quot;) . @CRLF .&lt;br /&gt;
		DllStructGetData($a,&amp;quot;var2&amp;quot;) . @CRLF .&lt;br /&gt;
		DllStructGetData($a,&amp;quot;var3&amp;quot;) . @CRLF .&lt;br /&gt;
		DllStructGetData($a,&amp;quot;var4&amp;quot;),&lt;br /&gt;
		&amp;quot;DllStruct&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Heres an example of using DLLStruct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create the struct&lt;br /&gt;
$a = DLLStructCreate(&amp;quot;int x; int y&amp;quot;);&lt;br /&gt;
// Print its info just for sake of it&lt;br /&gt;
println( &amp;quot;DLLStruct info: &amp;quot; . $a );&lt;br /&gt;
&lt;br /&gt;
// Call &amp;quot;GetCursorPos&amp;quot; API and send the struct to it using the &amp;quot;t&amp;quot; param&lt;br /&gt;
$ret = DLLCall(&amp;quot;User32.dll&amp;quot;, &amp;quot;GetCursorPos&amp;quot;, &amp;quot;Int32&amp;quot;, &amp;quot;t&amp;quot;, &amp;quot;Ansi&amp;quot;, $a);&lt;br /&gt;
&lt;br /&gt;
if($ret)&lt;br /&gt;
{&lt;br /&gt;
	// Get the X and Y from the struct&lt;br /&gt;
	$x = DLLStructGetData($a, &amp;quot;x&amp;quot;);&lt;br /&gt;
	$y = DLLStructGetData($a, &amp;quot;y&amp;quot;);&lt;br /&gt;
	// Print it&lt;br /&gt;
	println(&amp;quot;X '$x' Y '$y'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;GetCursorPos() api failed...&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another DLLStruct example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create the struct&lt;br /&gt;
$a = DLLStructCreate(&amp;quot;char x[500]; char y[500]; char z[500]&amp;quot;);&lt;br /&gt;
// Print its info just for sake of it&lt;br /&gt;
println( &amp;quot;DLLStruct info: &amp;quot; . $a );&lt;br /&gt;
 &lt;br /&gt;
// Zero term the strings just to be sure&lt;br /&gt;
DLLStructSetData($a, &amp;quot;x&amp;quot;, &amp;quot;\0&amp;quot;, 0);&lt;br /&gt;
DLLStructSetData($a, &amp;quot;y&amp;quot;, &amp;quot;\0&amp;quot;, 0);&lt;br /&gt;
DLLStructSetData($a, &amp;quot;z&amp;quot;, &amp;quot;\0&amp;quot;, 0);&lt;br /&gt;
 &lt;br /&gt;
// Call a few apis&lt;br /&gt;
DLLCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;wsprintf&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;tpii&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;x&amp;quot;), &amp;quot;Number is '%d' in hex '%x'&amp;quot;, 100, 200);&lt;br /&gt;
DLLCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;wsprintf&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;tpii&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;y&amp;quot;), &amp;quot;Number is '%d' in hex '%x'&amp;quot;, 1337, 4242);&lt;br /&gt;
DLLCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;wsprintf&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;tpp&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;z&amp;quot;), &amp;quot;STR '%s'&amp;quot;, DLLStructGetData($a, &amp;quot;x&amp;quot;));&lt;br /&gt;
// This time lets use lstrcat to append text to our strings&lt;br /&gt;
DLLCall(&amp;quot;kernel32.dll&amp;quot;, &amp;quot;lstrcat&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;tp&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;z&amp;quot;), &amp;quot; | Added to string&amp;quot;);&lt;br /&gt;
DLLCall(&amp;quot;kernel32.dll&amp;quot;, &amp;quot;lstrcat&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;tp&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;z&amp;quot;), &amp;quot;; Also added...&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
// Print it&lt;br /&gt;
println(   DLLStructGetData($a, &amp;quot;x&amp;quot;)   );&lt;br /&gt;
println(   DLLStructGetData($a, &amp;quot;y&amp;quot;)   );&lt;br /&gt;
println(   DLLStructGetData($a, &amp;quot;z&amp;quot;)   );&lt;br /&gt;
println(   &amp;quot;Length of X is: &amp;quot; . DLLCall(&amp;quot;kernel32.dll&amp;quot;, &amp;quot;lstrlen&amp;quot;, &amp;quot;Int32&amp;quot;, &amp;quot;t&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;x&amp;quot;))   );&lt;br /&gt;
println(   &amp;quot;Length of Y is: &amp;quot; . DLLCall(&amp;quot;kernel32.dll&amp;quot;, &amp;quot;lstrlen&amp;quot;, &amp;quot;Int32&amp;quot;, &amp;quot;t&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;y&amp;quot;))   );&lt;br /&gt;
println(   &amp;quot;Length of Z is: &amp;quot; . DLLCall(&amp;quot;kernel32.dll&amp;quot;, &amp;quot;lstrlen&amp;quot;, &amp;quot;Int32&amp;quot;, &amp;quot;t&amp;quot;, &amp;quot;Ansi&amp;quot;, DLLStructGetPtr($a, &amp;quot;z&amp;quot;))   );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A very large DLLCall + DLLStruct example using C function sprintf :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$myString = WSPrintf('Testing &amp;quot;%c%c%c&amp;quot; %d | %u hehe %d....%s %f', 'A', 'B', 'B', 12, 131, 200, &amp;quot;omg&amp;quot;, 133.77);&lt;br /&gt;
println($myString);&lt;br /&gt;
 &lt;br /&gt;
// Use the sprintf from msvcrt as an example for DLLCall&lt;br /&gt;
// Havent added uint64/int64 support yet&lt;br /&gt;
// Of course we could have just built the new string as we found params&lt;br /&gt;
// but that wouldnt be using dll then would it?&lt;br /&gt;
// Also this demonstrates the Eval() function to dynamically create Sputnik code&lt;br /&gt;
[Args(&amp;quot;true&amp;quot;)] // Allow the @args variable to be made (we will use it)&lt;br /&gt;
Function WSPrintf( $Format )&lt;br /&gt;
{&lt;br /&gt;
	$Args = array();&lt;br /&gt;
	$Len = StrLen($Format);&lt;br /&gt;
	$EstMaxLen = $Len;&lt;br /&gt;
	$LastC = '';&lt;br /&gt;
	$DLLParDef = &amp;quot;&amp;quot;;&lt;br /&gt;
	$DLLPars = &amp;quot;&amp;quot;;&lt;br /&gt;
	$b64Bit = false;&lt;br /&gt;
	for(my $i = 0, my $j = 1; $i &amp;lt; $Len; $i++)&lt;br /&gt;
	{&lt;br /&gt;
		$char = $Format[$i];&lt;br /&gt;
		switch ($char)&lt;br /&gt;
		{&lt;br /&gt;
			case '%':&lt;br /&gt;
			{&lt;br /&gt;
				if($LastC == &amp;quot;\\&amp;quot;)&lt;br /&gt;
					break;&lt;br /&gt;
				$i++;&lt;br /&gt;
				if($i &amp;gt;= $Len)&lt;br /&gt;
				{&lt;br /&gt;
					throw new exception(&amp;quot;Format string is invalid&amp;quot;);&lt;br /&gt;
					return 0;&lt;br /&gt;
				}&lt;br /&gt;
				$char = $Format[$i];&lt;br /&gt;
				switch ($char)&lt;br /&gt;
				{&lt;br /&gt;
					case '%':&lt;br /&gt;
						{&lt;br /&gt;
							$b64Bit = false;&lt;br /&gt;
						}&lt;br /&gt;
						break;&lt;br /&gt;
					case 'l':&lt;br /&gt;
					case 'L':&lt;br /&gt;
						{&lt;br /&gt;
							$b64Bit = true;							&lt;br /&gt;
						}&lt;br /&gt;
						break;&lt;br /&gt;
					case 'c':&lt;br /&gt;
						{&lt;br /&gt;
							$EstMaxLen += 2;&lt;br /&gt;
							$DLLParDef .= &amp;quot;b&amp;quot;;&lt;br /&gt;
							$DLLPars .= ', (Char)@args[' . $j . ']';&lt;br /&gt;
							$j++;&lt;br /&gt;
							$b64Bit = false;&lt;br /&gt;
						}&lt;br /&gt;
						break;&lt;br /&gt;
					case 'd':&lt;br /&gt;
					case 'i':&lt;br /&gt;
					case 'o':&lt;br /&gt;
					case 'p':&lt;br /&gt;
						{&lt;br /&gt;
							if($b64Bit)&lt;br /&gt;
							{&lt;br /&gt;
								$EstMaxLen += 20;&lt;br /&gt;
								$DLLParDef .= &amp;quot;l&amp;quot;;&lt;br /&gt;
								$DLLPars .= ', (Int64)@args[' . $j . ']';&lt;br /&gt;
							}&lt;br /&gt;
							else&lt;br /&gt;
							{&lt;br /&gt;
								$EstMaxLen += 11;&lt;br /&gt;
								$DLLParDef .= &amp;quot;i&amp;quot;;&lt;br /&gt;
								$DLLPars .= ', (Int32)@args[' . $j . ']';&lt;br /&gt;
							}&lt;br /&gt;
							$j++;&lt;br /&gt;
							$b64Bit = false;&lt;br /&gt;
						}&lt;br /&gt;
						break;&lt;br /&gt;
					case 'o':&lt;br /&gt;
					case 'u':&lt;br /&gt;
					case 'x':&lt;br /&gt;
					case 'X':&lt;br /&gt;
						{&lt;br /&gt;
							if($b64Bit)&lt;br /&gt;
							{&lt;br /&gt;
								$EstMaxLen += 20;&lt;br /&gt;
								$DLLParDef .= &amp;quot;L&amp;quot;;&lt;br /&gt;
								$DLLPars .= ', (UInt64)@args[' . $j . ']';&lt;br /&gt;
							}&lt;br /&gt;
							else&lt;br /&gt;
							{&lt;br /&gt;
								$EstMaxLen += 11;&lt;br /&gt;
								$DLLParDef .= &amp;quot;I&amp;quot;;&lt;br /&gt;
								$DLLPars .= ', (UInt32)@args[' . $j . ']';&lt;br /&gt;
							}&lt;br /&gt;
							$j++;&lt;br /&gt;
							$b64Bit = false;&lt;br /&gt;
						}&lt;br /&gt;
						break;&lt;br /&gt;
					case 'f':&lt;br /&gt;
					case 'g':&lt;br /&gt;
					case 'e':&lt;br /&gt;
					case 'E':&lt;br /&gt;
						{&lt;br /&gt;
							$EstMaxLen += 20;&lt;br /&gt;
							$DLLParDef .= &amp;quot;d&amp;quot;;&lt;br /&gt;
							$DLLPars .= ', (double)@args[' . $j . ']';&lt;br /&gt;
							$j++;&lt;br /&gt;
							$b64Bit = false;&lt;br /&gt;
						}&lt;br /&gt;
						break;&lt;br /&gt;
					case 's':&lt;br /&gt;
						{&lt;br /&gt;
							$EstMaxLen += StrLen(@Args[$j] + 1);&lt;br /&gt;
							$DLLParDef .= &amp;quot;p&amp;quot;;&lt;br /&gt;
							$DLLPars .= ', (string)@args[' . $j . ']';&lt;br /&gt;
							$j++;&lt;br /&gt;
							$b64Bit = false;&lt;br /&gt;
						}&lt;br /&gt;
						break;&lt;br /&gt;
					default:&lt;br /&gt;
						{&lt;br /&gt;
							throw new exception(&amp;quot;Invalid specifier '$char'&amp;quot;);&lt;br /&gt;
							return 0;&lt;br /&gt;
						}&lt;br /&gt;
					break;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			break;&lt;br /&gt;
		}&lt;br /&gt;
		$LastC = $char;&lt;br /&gt;
	}&lt;br /&gt;
	// Create the correct size struct which will hold the newly made string&lt;br /&gt;
	// It should have been calculated to a good degree of accuracy so we&lt;br /&gt;
	// Dont really expect any buffer overflows here&lt;br /&gt;
	$Struct = DLLStructCreate(&amp;quot;char buf[$EstMaxLen];&amp;quot;);&lt;br /&gt;
	// Create the DLL call string&lt;br /&gt;
	$CallString = 'DLLCall(&amp;quot;msvcrt.dll&amp;quot;, &amp;quot;sprintf&amp;quot;, &amp;quot;Int32&amp;quot;, &amp;quot;tp' . $DLLParDef . '&amp;quot;, &amp;quot;Ansi:cdecl&amp;quot;, $Struct, $Format' . $DLLPars . ');';&lt;br /&gt;
	$RetVal = Eval($CallString); // Dynamically call the dll using the string as if it was physical Sputnik code&lt;br /&gt;
	if(Eval($CallString) == 0)&lt;br /&gt;
	{&lt;br /&gt;
		unset($Struct); // Cleanup the Struct&lt;br /&gt;
		return 0;&lt;br /&gt;
	}&lt;br /&gt;
	$newStr = DLLStructGetData($Struct, &amp;quot;buf&amp;quot;);&lt;br /&gt;
	unset($Struct); // Cleanup the Struct&lt;br /&gt;
	return $newStr;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A very large DLLCall + DLLStruct example using C function sprintf :&lt;br /&gt;
&lt;br /&gt;
This time we will use a cache to store the DLL imported functions in a buffer and execute it again without having to recompile it each time the function is called.&lt;br /&gt;
&lt;br /&gt;
The way it will work is it will remember your param defs such as &amp;quot;ippi&amp;quot; if the defs are the same when you call the function again it will use the previously compiled and cached function instead of creating a new one.&lt;br /&gt;
&lt;br /&gt;
The benefit of this is amazing speed improvement by up to 10 fold.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $CallArray = array(); // Store imported DLL functions&lt;br /&gt;
&lt;br /&gt;
// Print 10,000 items very rapidly&lt;br /&gt;
my $Tick = TickCount();&lt;br /&gt;
for(my $i = 0; $i &amp;lt; 10000; $i++)&lt;br /&gt;
{&lt;br /&gt;
	$var = CSPrintf(&amp;quot;The value is '%d'\n&amp;quot;, $i);&lt;br /&gt;
	print(&amp;quot;Returned: $var&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
say(&amp;quot;Final (in seconds): &amp;quot; . (TickCount($Tick) / 1000.0));&lt;br /&gt;
&lt;br /&gt;
[Args(&amp;quot;true&amp;quot;)] // Allow the @args variable to be made (we will use it)&lt;br /&gt;
Function CSPrintf( $Format )&lt;br /&gt;
{&lt;br /&gt;
	$Args = array();&lt;br /&gt;
	$Len = StrLen($Format);&lt;br /&gt;
	$EstMaxLen = $Len;&lt;br /&gt;
	$LastC = '';&lt;br /&gt;
	$DLLParDef = &amp;quot;&amp;quot;;&lt;br /&gt;
	$DLLPars = &amp;quot;&amp;quot;;&lt;br /&gt;
	$b64Bit = false;&lt;br /&gt;
	for(my $i = 0, my $j = 1; $i &amp;lt; $Len; $i++)&lt;br /&gt;
	{&lt;br /&gt;
		$char = $Format[$i];&lt;br /&gt;
		switch ($char)&lt;br /&gt;
		{&lt;br /&gt;
			case '%':&lt;br /&gt;
			{&lt;br /&gt;
				if($LastC == &amp;quot;\\&amp;quot;)&lt;br /&gt;
					break;&lt;br /&gt;
				$i++;&lt;br /&gt;
				if($i &amp;gt;= $Len)&lt;br /&gt;
				{&lt;br /&gt;
					throw new exception(&amp;quot;Format string is invalid&amp;quot;);&lt;br /&gt;
					return 0;&lt;br /&gt;
				}&lt;br /&gt;
				$char = $Format[$i];&lt;br /&gt;
				switch ($char)&lt;br /&gt;
				{&lt;br /&gt;
					case '%':&lt;br /&gt;
						$b64Bit = false;&lt;br /&gt;
						break;&lt;br /&gt;
					case 'l':&lt;br /&gt;
					case 'L':&lt;br /&gt;
						$b64Bit = true;	&lt;br /&gt;
						break;&lt;br /&gt;
					case 'c':&lt;br /&gt;
						$EstMaxLen += 2;&lt;br /&gt;
						$DLLParDef .= &amp;quot;b&amp;quot;;&lt;br /&gt;
						$DLLPars .= ', (Char)@args[' . $j . ']';&lt;br /&gt;
						$j++;&lt;br /&gt;
						$b64Bit = false;&lt;br /&gt;
						break;&lt;br /&gt;
					case 'd':&lt;br /&gt;
					case 'i':&lt;br /&gt;
					case 'o':&lt;br /&gt;
					case 'p':&lt;br /&gt;
						if($b64Bit)&lt;br /&gt;
						{&lt;br /&gt;
							$EstMaxLen += 20;&lt;br /&gt;
							$DLLParDef .= &amp;quot;l&amp;quot;;&lt;br /&gt;
							$DLLPars .= ', (Int64)@args[' . $j . ']';&lt;br /&gt;
						}&lt;br /&gt;
						else&lt;br /&gt;
						{&lt;br /&gt;
							$EstMaxLen += 11;&lt;br /&gt;
							$DLLParDef .= &amp;quot;i&amp;quot;;&lt;br /&gt;
							$DLLPars .= ', (Int32)@args[' . $j . ']';&lt;br /&gt;
						}&lt;br /&gt;
						$j++;&lt;br /&gt;
						$b64Bit = false;&lt;br /&gt;
						break;&lt;br /&gt;
					case 'o':&lt;br /&gt;
					case 'u':&lt;br /&gt;
					case 'x':&lt;br /&gt;
					case 'X':&lt;br /&gt;
						if($b64Bit)&lt;br /&gt;
						{&lt;br /&gt;
							$EstMaxLen += 20;&lt;br /&gt;
							$DLLParDef .= &amp;quot;L&amp;quot;;&lt;br /&gt;
							$DLLPars .= ', (UInt64)@args[' . $j . ']';&lt;br /&gt;
						}&lt;br /&gt;
						else&lt;br /&gt;
						{&lt;br /&gt;
							$EstMaxLen += 11;&lt;br /&gt;
							$DLLParDef .= &amp;quot;I&amp;quot;;&lt;br /&gt;
							$DLLPars .= ', (UInt32)@args[' . $j . ']';&lt;br /&gt;
						}&lt;br /&gt;
						$j++;&lt;br /&gt;
						$b64Bit = false;&lt;br /&gt;
						break;&lt;br /&gt;
					case 'f':&lt;br /&gt;
					case 'g':&lt;br /&gt;
					case 'e':&lt;br /&gt;
					case 'E':&lt;br /&gt;
						$EstMaxLen += 20;&lt;br /&gt;
						$DLLParDef .= &amp;quot;d&amp;quot;;&lt;br /&gt;
						$DLLPars .= ', (double)@args[' . $j . ']';&lt;br /&gt;
						$j++;&lt;br /&gt;
						$b64Bit = false;&lt;br /&gt;
						break;&lt;br /&gt;
					case 's':&lt;br /&gt;
						$EstMaxLen += StrLen(@Args[$j] + 1);&lt;br /&gt;
						$DLLParDef .= &amp;quot;p&amp;quot;;&lt;br /&gt;
						$DLLPars .= ', (string)@args[' . $j . ']';&lt;br /&gt;
						$j++;&lt;br /&gt;
						$b64Bit = false;&lt;br /&gt;
						break;&lt;br /&gt;
					default:&lt;br /&gt;
						throw new exception(&amp;quot;Invalid specifier '$char'&amp;quot;);&lt;br /&gt;
						return 0;&lt;br /&gt;
					break;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			break;&lt;br /&gt;
		}&lt;br /&gt;
		$LastC = $char;&lt;br /&gt;
	}&lt;br /&gt;
	// Create a unique hash that will be the same for everything that calls this function with the same definition&lt;br /&gt;
	// but allow for unique parameters to be passed of course&lt;br /&gt;
	my $Hash = 'sprintf' . Hash('p' . $DLLParDef);&lt;br /&gt;
	if((!IsKeySet($CallArray, $Hash)))&lt;br /&gt;
	{&lt;br /&gt;
		my $RandName = &amp;quot;sprintf_&amp;quot; . RandStr(10); // Generate name for new function (must be unique)&lt;br /&gt;
		$CallArray[$Hash] = $RandName; // Insert the function name into array&lt;br /&gt;
		// Create the function by importing it form the DLL&lt;br /&gt;
		DLLImport(&amp;quot;msvcrt.dll&amp;quot;, &amp;quot;sprintf:$RandName&amp;quot;, &amp;quot;Int32&amp;quot;, &amp;quot;tp$DLLParDef&amp;quot;, &amp;quot;Ansi:cdecl&amp;quot;);&lt;br /&gt;
		&lt;br /&gt;
	}&lt;br /&gt;
	// Get function name from array so we can call it&lt;br /&gt;
	my $FuncName = $CallArray[$Hash];&lt;br /&gt;
	// Create the correct size struct which will hold the newly made string&lt;br /&gt;
	// It should have been calculated to a good degree of accuracy so we&lt;br /&gt;
	// Dont really expect any buffer overflows here&lt;br /&gt;
	$Struct = DLLStructCreate(&amp;quot;char buf[$EstMaxLen];&amp;quot;);&lt;br /&gt;
	// Build a string to execute as Sputnik code&lt;br /&gt;
	$CallString = $FuncName . '($Struct, $Format' . $DLLPars . ');';&lt;br /&gt;
	// Call it&lt;br /&gt;
	if(Eval($CallString) == 0)&lt;br /&gt;
	{&lt;br /&gt;
		unset($Struct); // Cleanup the Struct&lt;br /&gt;
		return 0;&lt;br /&gt;
	}&lt;br /&gt;
	$newStr = DLLStructGetData($Struct, &amp;quot;buf&amp;quot;);&lt;br /&gt;
	unset($Struct); // Cleanup the Struct&lt;br /&gt;
	return $newStr;&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://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-21T18:39:49Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Magic Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
To implement it you must use the override keyword as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	my $_id;&lt;br /&gt;
	override my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$_id;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not define a GET or SET accessor or else you will get an error.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Functions ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as functions above but this time it will be marked as abstract so any class inheriting our class must implement a function by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
To implement it you must use the override keyword as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class we will inherit&lt;br /&gt;
Class EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// define an abstract function&lt;br /&gt;
	abstract Function Engine() { }&lt;br /&gt;
	// define two abstract properties&lt;br /&gt;
	Abstract my $GearVer { }&lt;br /&gt;
	Abstract my $GearBox { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define the final class&lt;br /&gt;
Class Car extends EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// override the abstract function Engine()&lt;br /&gt;
	override Function Engine()&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;V8&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	// streamlined property&lt;br /&gt;
	override my $GearVer { get { return &amp;quot;1.0&amp;quot;; } }&lt;br /&gt;
	// expanded property&lt;br /&gt;
	override my $GearBox&lt;br /&gt;
	{&lt;br /&gt;
		get &lt;br /&gt;
		{&lt;br /&gt;
			return &amp;quot;12Gears&amp;quot;; &lt;br /&gt;
		} &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $c = new Car();&lt;br /&gt;
say &amp;quot;Engine: &amp;quot; . $c-&amp;gt;Engine();&lt;br /&gt;
say &amp;quot;GearVer: &amp;quot; . $c-&amp;gt;$GearVer;&lt;br /&gt;
say &amp;quot;GearBox: &amp;quot; . $c-&amp;gt;$GearBox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Engine: V8&lt;br /&gt;
// GearVer: 1.0&lt;br /&gt;
// GearBox: 12Gears&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not define any statements in the { } block of the abstract function or else you will get an error.&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions/Properties (others) ====&lt;br /&gt;
&lt;br /&gt;
These magic functions and properties are used by other core functions that are nothing to do with classes directly (usually)but will work classes in a special way if you extend or do something that it requires.&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Count|Count( )]] -- This lets you override what number count() will return when it is used against the class&lt;br /&gt;
* [[Core Function JsonEncode|JsonEncode( )]] -- This one lets you control what gets serialized and how&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik supports multiple inheritance in a rather unique and powerful way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class we will inherit&lt;br /&gt;
Class EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// define an abstract function&lt;br /&gt;
	abstract Function Engine() { }&lt;br /&gt;
	// define two abstract properties&lt;br /&gt;
	Abstract my $GearVer { }&lt;br /&gt;
	Abstract my $GearBox { }&lt;br /&gt;
	// define a normal Function&lt;br /&gt;
	// the final class will inherit this&lt;br /&gt;
	// and since it is not an abstract it will&lt;br /&gt;
	// appear as if it was literally inside the&lt;br /&gt;
	// original&lt;br /&gt;
	Function EngineTest()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testing engine...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define another class we will inherit&lt;br /&gt;
Class CarColour&lt;br /&gt;
{&lt;br /&gt;
	// define an abstract property&lt;br /&gt;
	Abstract my $Colour { }&lt;br /&gt;
	// define a normal Function&lt;br /&gt;
	// the final class will inherit this&lt;br /&gt;
	// and since it is not an abstract it will&lt;br /&gt;
	// appear as if it was literally inside the&lt;br /&gt;
	// original&lt;br /&gt;
	Function ColourTest()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testing colours...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define the final class&lt;br /&gt;
// We will multiple inherit both &lt;br /&gt;
// EngineInfo AND CarColour&lt;br /&gt;
Class Car extends EngineInfo, CarColour&lt;br /&gt;
{&lt;br /&gt;
	// override the abstract function Engine()&lt;br /&gt;
	override Function Engine()&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;V8&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	// streamlined properties&lt;br /&gt;
	override my $GearVer { get { return &amp;quot;1.0&amp;quot;; } }&lt;br /&gt;
	override my $Colour { get { return &amp;quot;Red&amp;quot;; } }&lt;br /&gt;
	// expanded property&lt;br /&gt;
	override my $GearBox&lt;br /&gt;
	{&lt;br /&gt;
		get &lt;br /&gt;
		{&lt;br /&gt;
			return &amp;quot;12Gears&amp;quot;; &lt;br /&gt;
		} &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $c = new Car();&lt;br /&gt;
say &amp;quot;Colour: &amp;quot; . $c-&amp;gt;$Colour;&lt;br /&gt;
say &amp;quot;Engine: &amp;quot; . $c-&amp;gt;Engine();&lt;br /&gt;
say &amp;quot;GearVer: &amp;quot; . $c-&amp;gt;$GearVer;&lt;br /&gt;
say &amp;quot;GearBox: &amp;quot; . $c-&amp;gt;$GearBox;&lt;br /&gt;
$c-&amp;gt;EngineTest();&lt;br /&gt;
$c-&amp;gt;ColourTest();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Colour: Red&lt;br /&gt;
// Engine: V8&lt;br /&gt;
// GearVer: 1.0&lt;br /&gt;
// GearBox: 12Gears&lt;br /&gt;
// Testing engine...&lt;br /&gt;
// Testing colours...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_Count</id>
		<title>Core Function Count</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_Count"/>
				<updated>2015-09-21T18:37:07Z</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;
Count( &amp;lt;array/binary-array/class&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Returns the total amount of elements in an array.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== array/binary-array ====&lt;br /&gt;
&lt;br /&gt;
The array to use.&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
The binary variable to use.&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
A class to use that extends the Countable class.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success - Returns the total amount of elements in the array/binary-array or what the count property returned from the class.&lt;br /&gt;
&lt;br /&gt;
Failure - Returns null.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Remember that the value returned by Count is one greater than the index of an array's last element!&lt;br /&gt;
&lt;br /&gt;
In Sputnik an array does not necessary start at index 0 and move upwards infact an array can start at any number and jump all over place this all depends where the user has placed items into the array.&lt;br /&gt;
&lt;br /&gt;
If the user uses push() then all items in array will be correct order.&lt;br /&gt;
&lt;br /&gt;
This also returns how many characters are in a string.&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;
$arrayOLD = array ( 10..15, 24..30 );&lt;br /&gt;
&lt;br /&gt;
$i = 0;&lt;br /&gt;
Foreach( $arrayOLD as  $j )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Element ($i) is: &amp;quot; . $j);&lt;br /&gt;
	$i++;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Size is: &amp;quot; . Count($arrayOLD) ); // Prints 13&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Heres an example of getting the size of binary data :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$binary = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
// Yes you can get the size of the binary byte array by using Count just like with arrays&lt;br /&gt;
println(&amp;quot;The binary size is: &amp;quot; . Count($binary) );&lt;br /&gt;
Foreach ( $binary as $i )&lt;br /&gt;
{&lt;br /&gt;
	println( &amp;quot;Byte: &amp;quot; . $i . &amp;quot; | Hex: &amp;quot; . Hex($i) . &amp;quot; | Char: &amp;quot; . Chr($i) );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using a class with extended Countable so that the property named count gets used to return a value for count() example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy extends Countable&lt;br /&gt;
{&lt;br /&gt;
	override my $Count { get { return 700; } }&lt;br /&gt;
}&lt;br /&gt;
$a = new Testy();&lt;br /&gt;
say count($a);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 700&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://ubersoft.org/Sputnik/wiki/index.php/Function_Reference</id>
		<title>Function Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Function_Reference"/>
				<updated>2015-09-21T18:35:30Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Array Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Function Reference ==&lt;br /&gt;
&lt;br /&gt;
=== How to create a Function ===&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Core Functions ===&lt;br /&gt;
&lt;br /&gt;
If a link is red (unclickable) the function either doesnt exist yet and is pending creation or it has been created but does not yet have a page/example.&lt;br /&gt;
&lt;br /&gt;
==== Language Features ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Translation|&amp;lt;Expression&amp;gt; =~ tr/searchList/replacementList/flags]] -- Translate characters from one character set to another similar to StrTr() function&lt;br /&gt;
* [[Core Function Regex Match|&amp;lt;Expression&amp;gt; =~ m/pattern/flags]] -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups&lt;br /&gt;
* [[Core Function Regex Replace|&amp;lt;Expression&amp;gt; =~ s/pattern/replacement/flags]] -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups&lt;br /&gt;
* [[Core Function Goto Label|Goto Label; &amp;amp; Label:]] -- Jump to another section of the script&lt;br /&gt;
* [[Core Function List|&amp;lt;Scope&amp;gt; List( &amp;lt;expressions&amp;gt;, .. ) = &amp;lt;array&amp;gt;]] -- Extract some elements from an array into ready to use variables&lt;br /&gt;
* [[Core Function Pointer Read/Write Bracket|$ptr[&amp;lt;index&amp;gt;]:&amp;lt;type&amp;gt; = &amp;lt;value&amp;gt;]] -- Read and Write to memory pointers similar to PTRRead() and PTRWrite() but using [] to simulate like it's an array&lt;br /&gt;
* [[Core Function Array Splicing|Array Splicing]] -- Copy parts out of an array and return them as a new array&lt;br /&gt;
* [[Core Function Function Variables|Function Variables]] -- Dynamically create function source code and place it in a variable and call it from the variable&lt;br /&gt;
&lt;br /&gt;
===== Parser Engine =====&lt;br /&gt;
* [[Core Function Parser Engine|Parser Engine]] -- Parse text and have classes created and returned to you&lt;br /&gt;
* [[Core Function Parser|Parser( &amp;lt;grammar&amp;gt;, &amp;lt;tokenName&amp;gt;, &amp;lt;trimRules&amp;gt; )]] -- Create a new parser&lt;br /&gt;
* [[Core Function Parse|Parse( &amp;lt;parser&amp;gt;, &amp;lt;text&amp;gt; )]] -- Parse text with a parser created with Parser()&lt;br /&gt;
* [[Core Function IsToken|IsToken( &amp;lt;object&amp;gt; )]] -- Check if a given object is a token created from the parser&lt;br /&gt;
* [[Core Function TokenClass|TokenClass( &amp;lt;token&amp;gt; )]] -- Get the class the token is linked to&lt;br /&gt;
&lt;br /&gt;
==== Console Functions ====&lt;br /&gt;
* [[Core Function Print|Echo( )]] -- Alias for [[Core Function Print|Print( )]]&lt;br /&gt;
* [[Core Function Println|Say( )]] -- Alias for [[Core Function Println|Println( )]]&lt;br /&gt;
* [[Core Function Print|Print( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window&lt;br /&gt;
* [[Core Function Println|Println( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window and inserts a newline character at the end.&lt;br /&gt;
* [[Core Function Printf|Printf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) &lt;br /&gt;
* [[Core Function VPrintf|VPrintf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) using an array as the parameters &lt;br /&gt;
* [[Core Function PrintfC|PrintfC( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Print a formatted string to the console window&lt;br /&gt;
* [[Core Function Input|Input( &amp;lt;prompt&amp;gt; )]] -- Capture a string typed to console window&lt;br /&gt;
* [[Core Function InputC|InputC( &amp;lt;prompt/flag&amp;gt; )]] -- Capture a char (or info about the char) typed to console window&lt;br /&gt;
* [[Core Function Pause|Pause( &amp;lt;expression&amp;gt; )]] -- Pause the execution of the script on the console window until any key is pressed&lt;br /&gt;
* [[Core Function ConsoleClear|Cls( )]] -- Alias for [[Core Function ConsoleClear|ConsoleClear( )]]&lt;br /&gt;
* [[Core Function ConsoleClear|ConsoleClear( )]] -- Clear all text from the console window&lt;br /&gt;
* [[Core Function ConsoleKeyAvailable|ConsoleKeyAvailable( )]] -- Check if there is a key ready to be read from the console &lt;br /&gt;
* [[Core Function ConsoleCapsLock|ConsoleCapsLock( )]] -- Check if caps lock is down on the console &lt;br /&gt;
* [[Core Function ConsoleSetCursor|ConsoleSetCursor( &amp;lt;posX&amp;gt;, &amp;lt;posY&amp;gt; )]] -- Set the cursor position on the console&lt;br /&gt;
* [[Core Function ConsoleSetBuffer|ConsoleSetBuffer( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console text buffer size&lt;br /&gt;
* [[Core Function ConsoleSetSize|ConsoleSetSize( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console window size&lt;br /&gt;
* [[Core Function ConsoleHide|ConsoleHide( )]] -- Hide the console window&lt;br /&gt;
* [[Core Function ConsoleShow|ConsoleShow( )]] -- Show the console window&lt;br /&gt;
* [[Core Function ConsoleState|ConsoleState( )]] -- Get the console state (Visible, Hidden)&lt;br /&gt;
* [[Core Function ConsoleBeep|ConsoleBeep( &amp;lt;freq&amp;gt;, &amp;lt;duration&amp;gt; )]] -- Plays the sound of a beep of a specified frequency and duration through the console speaker&lt;br /&gt;
* [[Core Function ConsoleSeek|ConsoleSeek( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Set the position of the console cursor&lt;br /&gt;
* [[Core Function ConsoleBackColour|ConsoleBackColour( &amp;lt;colour&amp;gt; )]] -- Set the background (behind text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleForeColour|ConsoleForeColour( &amp;lt;colour&amp;gt; )]] -- Set the foreground (text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleBufferWidth|ConsoleBufferWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer width of the console window&lt;br /&gt;
* [[Core Function ConsoleBufferHeight|ConsoleBufferHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer height of the console window&lt;br /&gt;
* [[Core Function ConsoleWidth|ConsoleWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the width of the console window&lt;br /&gt;
* [[Core Function ConsoleHeight|ConsoleHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the height of the console window&lt;br /&gt;
* [[Core Function ConsoleTitle|ConsoleTitle( &amp;lt;newtitle&amp;gt; )]] -- Get or Set the title of the console window&lt;br /&gt;
* [[Core Function ConsoleCursorLeft|ConsoleCursorLeft( &amp;lt;newval&amp;gt; )]] -- Gets or sets the column position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorTop|ConsoleCursorTop( &amp;lt;newval&amp;gt; )]] -- Gets or sets the row position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorSize|ConsoleCursorSize( &amp;lt;newval&amp;gt; )]] -- Gets or sets the height of the cursor within a character cell&lt;br /&gt;
* [[Core Function ConsoleCursorVisible|ConsoleCursorVisible( &amp;lt;newval&amp;gt; )]] -- Gets or sets a value indicating whether the cursor is visible&lt;br /&gt;
* [[Core Function CGIConsole|CGIConsole( )]] -- Changes the console printing to work best a CGI instead of stand alone terminal&lt;br /&gt;
&lt;br /&gt;
==== Multi-Threading Functions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ThreadCreate|ThreadCreate( &amp;lt;name&amp;gt;, &amp;lt;function&amp;gt;, &amp;lt;extra&amp;gt; )]] -- Create a new thread and start it off executing a function or some code&lt;br /&gt;
* [[Core Function ThreadSleep|ThreadSleep( &amp;lt;name&amp;gt; )]] -- Freeze a thread and make it sleep&lt;br /&gt;
* [[Core Function ThreadResume|ThreadResume( &amp;lt;name&amp;gt; )]] -- Unfreeze a thread and allow it to continue execution&lt;br /&gt;
* [[Core Function ThreadState|ThreadState( &amp;lt;name&amp;gt; )]] -- Returns state of a thread&lt;br /&gt;
* [[Core Function ThreadKill|ThreadKill( &amp;lt;name&amp;gt; )]] -- Terminate a thread and remove it from the script&lt;br /&gt;
* [[Core Function ThreadExists|ThreadExists( &amp;lt;name&amp;gt; )]] -- Check if a thread exists by this name&lt;br /&gt;
* [[Core Function ThreadName|ThreadName( )]] -- Returns the name of the current thread that is executing this code&lt;br /&gt;
* [[Core Function ThreadLock|ThreadLock( &amp;lt;lockname&amp;gt; ) {}]] -- Locks a given section of code allowing only one thread to execute it at a time&lt;br /&gt;
* [[Core Function Threads|Threads( )]] -- Return an array of all threads&lt;br /&gt;
&lt;br /&gt;
==== Variable Type Conversions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Bool|Bool( &amp;lt;expression&amp;gt; )]] -- Returns the TRUE(1) or FALSE(0) representation of an expression&lt;br /&gt;
* [[Core Function Char|Char( &amp;lt;expression&amp;gt; )]] -- Returns the single letter representation of an expression&lt;br /&gt;
* [[Core Function Byte|Byte( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function SByte|SByte( &amp;lt;expression&amp;gt; )]] -- Returns the signed 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Short|Short( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int16|Int16( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int32|Int32( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int|Int( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int64|Int64( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Long|Long( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UShort|UShort( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt16|UInt16( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt32|UInt32( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt|UInt( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt64|UInt64( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function ULong|ULong( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Ptr|Ptr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function IntPtr|IntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function UPtr|UPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function UIntPtr|UIntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function Float|Float( &amp;lt;expression&amp;gt; )]] -- Returns the 32-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function Double|Double( &amp;lt;expression&amp;gt; )]] -- Returns the 64-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function String|String( &amp;lt;expression&amp;gt; )]] -- Returns the String representation of an expression&lt;br /&gt;
* [[Core Function Ascii|Ascii( &amp;lt;expression&amp;gt; )]] -- Returns the String (In raw ASCII) representation of an expression&lt;br /&gt;
* [[Core Function Binary|Binary( &amp;lt;expression&amp;gt; )]] -- Returns the Binary (raw bytes) representation of an expression&lt;br /&gt;
&lt;br /&gt;
==== Common Variable Functions ====&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function IsSet|IsSet( $variable )]] -- Determine if a variable is set and is not NULL&lt;br /&gt;
* [[Core Function Unset|Unset( $variable )]] -- Delete a variable&lt;br /&gt;
* [[Core Function Ref|Ref( $variable )]] -- Retrieve the variable at the lowest depth in references that the current variable links to&lt;br /&gt;
* [[Core Function IsDeclared|IsDeclared( &amp;lt;variable name&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a variable has been declared&lt;br /&gt;
* [[Core Function Printr|Printr( $variable, &amp;lt;newline&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Prints all details about a variable in a way thats easy for humans to read it (Will print arrays etc)&lt;br /&gt;
* [[Core Function VarDump|VarDump( $variable, &amp;lt;newline&amp;gt; )]] -- Dumps information about a variable&lt;br /&gt;
* [[Core Function Assign|Assign( &amp;lt;varname&amp;gt;, &amp;lt;data&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Assigns a variable by name with the data&lt;br /&gt;
* [[Core Function Atof|Atof( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Double&lt;br /&gt;
* [[Core Function Atoi|Atoi( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int32&lt;br /&gt;
* [[Core Function Atol|Atol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToTol|StrTol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToToul|StrToul( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to UInt64&lt;br /&gt;
* [[Core Function IsNan|IsNan( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is NaN (Not a number)&lt;br /&gt;
* [[Core Function IsInf|IsInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Infinity&lt;br /&gt;
* [[Core Function IsPosInf|IsPosInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Positive-Infinity&lt;br /&gt;
* [[Core Function IsNegInf|IsNegInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Negative-Infinity&lt;br /&gt;
* [[Core Function IsNormal|IsNormal( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is neither NaN, PosInf, NegInf or Inf&lt;br /&gt;
* [[Core Function SignBit|SignBit( &amp;lt;variable&amp;gt; )]] -- Returns whether the sign of a variable is negative&lt;br /&gt;
&lt;br /&gt;
===== Type Checking =====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function isVar|isVar( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Checks if a variable is a type (as a string) or inherits from a type (if not strict) (the same as $a ~~ Type)&lt;br /&gt;
* [[Core Function isVarChar|isVarChar( $variable )]] -- Checks if a variable is a char type&lt;br /&gt;
* [[Core Function isVarBool|isVarBool( $variable )]] -- Checks if a variable is a boolean type&lt;br /&gt;
* [[Core Function isVarByte|isVarByte( $variable )]] -- Checks if a variable is an unsigned 8-bit integer type&lt;br /&gt;
* [[Core Function isVarSByte|isVarSByte( $variable )]] -- Checks if a variable is a signed 8-bit integer type&lt;br /&gt;
* [[Core Function isVarShort|isVarShort( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt16|isVarInt16( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt|isVarInt( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt32|isVarInt32( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt64|isVarInt64( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarLong|isVarLong( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarUShort|isVarUShort( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt16|isVarUInt16( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt|isVarUInt( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt32|isVarUInt32( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt64|isVarUInt64( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarULong|isVarULong( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarFloat|isVarFloat( $variable )]] -- Checks if a variable is a single precision floating point type&lt;br /&gt;
* [[Core Function isVarFP|isVarFP( $variable )]] -- Checks if a check if a variable type is only a float/double nothing else&lt;br /&gt;
* [[Core Function isVarDouble|isVarDouble( $variable )]] -- Checks if a variable is a double precision floating point type&lt;br /&gt;
* [[Core Function isVarPtr|isVarPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarIntPtr|isVarIntPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarUPtr|isVarUPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarUIntPtr|isVarUIntPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarString|isVarString( $variable )]] -- Checks if a variable is a string type&lt;br /&gt;
* [[Core Function isVarNumber|isVarNumber( $variable )]] -- Checks if a variable is any integer or float/double type&lt;br /&gt;
* [[Core Function isVarNull|isVarNull( $variable )]] -- Checks if a variable is null&lt;br /&gt;
* [[Core Function isVarBinary|isVarBinary( $variable )]] -- Checks if a variable is a binary type&lt;br /&gt;
* [[Core Function isVarFunction|isVarFunction( $variable )]] -- Checks if a variable is a function type&lt;br /&gt;
* [[Core Function isVarRef|isVarRef( $variable )]] -- Check if a variable is an reference to another variable&lt;br /&gt;
* [[Core Function isVarArray|isVarArray( $variable )]] -- Check if a variable is an array&lt;br /&gt;
* [[Core Function isVarObj|isVarObj( $variable, &amp;lt;type&amp;gt; )]] -- Check if a variable is an object type (This includes classes, file handles etc)&lt;br /&gt;
* [[Core Function isVarClass|isVarClass( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Check if a variable's object type is a class&lt;br /&gt;
* [[Core Function isVarDLLStruct|isVarDLLStruct( $variable )]] -- Check if a variable holds a DLLStruct&lt;br /&gt;
* [[Core Function isVarServer|isVarServer( $variable )]] -- Check if a variable holds a Server object from Listen()&lt;br /&gt;
* [[Core Function isVarClient|isVarClient( $variable )]] -- Check if a variable holds a Client object from Connect()&lt;br /&gt;
* [[Core Function isVarClientSocket|isVarClientSocket( $variable )]] -- Check if a variable holds a Client socket object&lt;br /&gt;
* [[Core Function isVarSocket|isVarSocket( $variable )]] -- Check if a variable holds a Socket object&lt;br /&gt;
* [[Core Function isVarSigned|isVarSigned( $variable )]] -- Check if a variable holds a signed integer&lt;br /&gt;
* [[Core Function isVarUnsigned|isVarUnsigned( $variable )]] -- Check if a variable holds an unsigned integer&lt;br /&gt;
&lt;br /&gt;
====== Get Type Directly ======&lt;br /&gt;
* [[Core Function GetVarType|GetVarType( $variable )]] -- Get the common type of a variable&lt;br /&gt;
* [[Core Function GetVarTypeName|GetVarTypeName( $variable )]] -- Get the common type of a variable (as a string)&lt;br /&gt;
* [[Core Function GetVarObjType|GetVarObjType( $variable )]] -- Get the common object type of a variable (If it is an object)&lt;br /&gt;
* [[Core Function GetVarObjTypeName|GetVarObjTypeName( $variable )]] -- Get the common object type of a variable (If it is an object) and return it as string&lt;br /&gt;
&lt;br /&gt;
==== Binary Data Management Functions ====&lt;br /&gt;
* [[Core Function Bin|Bin( &amp;lt;args&amp;gt; )]] -- Create a new binary variable&lt;br /&gt;
* [[Core Function Op|Op( &amp;lt;opCodes&amp;gt; )]] -- Create a new binary variable from a string of opCodes such as &amp;quot;AA 10 20&amp;quot;&lt;br /&gt;
* [[Core Function BinaryCreate|BinaryCreate( &amp;lt;size&amp;gt;, &amp;lt;fill&amp;gt; )]] -- Create a new binary variable and its array size and fill data type &lt;br /&gt;
* [[Core Function BinaryClone|BinaryClone( &amp;lt;binary-array&amp;gt; )]] -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one&lt;br /&gt;
* [[Core Function BinaryContains|BinaryContains( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* [[Core Function BinaryCRC32|BinaryCRC32( &amp;lt;binary-array&amp;gt; )]] -- Calculates the crc32 polynomial of a binary array&lt;br /&gt;
* [[Core Function BinaryWipe|BinaryWipe( &amp;lt;binary-array&amp;gt; )]] -- Wipes a binary variables data 100% and sets the variable to a blank int containing null&lt;br /&gt;
* [[Core Function BinaryFill|BinaryFill( &amp;lt;binary-array&amp;gt;, &amp;lt;fillWith&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Fill a binary variables data (replace all of it or part of it) with a given byte or zero&lt;br /&gt;
* [[Core Function BinaryStr|BinaryStr( &amp;lt;binary-array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Create a Hex string from a binary array&lt;br /&gt;
* [[Core Function BinaryHex|BinaryHex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a binary array from a hex string&lt;br /&gt;
* [[Core Function BinaryLen|BinaryLen( &amp;lt;binary-array&amp;gt;, &amp;lt;newLen&amp;gt; )]] -- Returns the number of bytes in a binary variable (or increase it's capacity for bytes)&lt;br /&gt;
* [[Core Function BinaryGet|BinaryGet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinarySet|BinarySet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinaryReverse|BinaryReverse( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Reverse the order bytes a binary variable&lt;br /&gt;
* [[Core Function BinaryRemove|BinaryRemove( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Remove bytes from a binary variable&lt;br /&gt;
* [[Core Function BinaryExpand|BinaryExpand( &amp;lt;binary-array&amp;gt; )]] -- Expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable&lt;br /&gt;
* [[Core Function BinaryStartsWith|BinaryStartsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable starts with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryEndsWith|BinaryEndsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable ends with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryIndexOf|BinaryIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryIndexOfAny|BinaryIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryLastIndexOf|BinaryLastIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryLastIndexOfAny|BinaryLastIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryRandom|BinaryRandom( &amp;lt;binary-array&amp;gt;, &amp;lt;seed&amp;gt; )]] -- Randomize all bytes in a binary variable&lt;br /&gt;
* [[Core Function BinaryReplace|BinaryReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;maxReplacements&amp;gt; )]] -- Search for a byte or string of bytes in a binary variable and replace it&lt;br /&gt;
* [[Core Function BinaryHash|BinaryHash( &amp;lt;binary-array&amp;gt; )]] -- Gain a unique Hash of the bytes in this binary variable&lt;br /&gt;
* [[Core Function BinaryMid|BinaryMid( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Create a binary variable by extracting a number of bytes from another binary variable&lt;br /&gt;
* [[Core Function BinaryMidReplace|BinaryMidReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace a section (from start to length) of the binary with the replacement binary&lt;br /&gt;
* [[Core Function BinaryConcat|BinaryConcat( &amp;lt;destination/array&amp;gt;, &amp;lt;values&amp;gt; )]] -- Mass append a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryJoin|BinaryJoin( &amp;lt;separator&amp;gt;, &amp;lt;values&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] -- Create a new Binary by joining together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryAppend|BinaryAppend( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Append a binary variables data onto the end or beginning of another binary variables data&lt;br /&gt;
* [[Core Function BinaryInsert|BinaryInsert( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;overwrite&amp;gt; )]] -- Insert a binary variables data into another binary variable at a specific location&lt;br /&gt;
* [[Core Function BinaryUnshift|BinaryUnshift( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the beginning of a binary variable&lt;br /&gt;
* [[Core Function BinaryPush|BinaryPush( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the end of a binary variable&lt;br /&gt;
* [[Core Function BinaryShift|BinaryShift( &amp;lt;binary-array&amp;gt; )]] -- Delete the first byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryPop|BinaryPop( &amp;lt;binary-array&amp;gt; )]] -- Delete the last byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryResize|BinaryResize( &amp;lt;binary-array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;data&amp;gt; )]] -- Resize a binary variables data array&lt;br /&gt;
* [[Core Function BinaryPadLeft|BinaryPadLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Left pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinaryPadRight|BinaryPadRight( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Right pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinarySHA1|BinarySHA1( &amp;lt;binary-array&amp;gt; )]] -- Returns the SHA1 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryFromStr|BinaryFromStr( &amp;lt;string&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new binary variable created from a strings raw bytes&lt;br /&gt;
* [[Core Function BinaryToStr|BinaryToStr( &amp;lt;binary-array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a new string containing the binary data as raw bytes&lt;br /&gt;
* [[Core Function BinaryMD5|BinaryMD5( &amp;lt;binary-array&amp;gt; )]] -- Returns the MD5 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryCompare|BinaryCompare( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;needle, &amp;lt;needleOffset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Compare two binary variables&lt;br /&gt;
* [[Core Function BinaryCompress|BinaryCompress( &amp;lt;binary-array&amp;gt; )]] -- Compress a binary variables data&lt;br /&gt;
* [[Core Function BinaryUncompress|BinaryUncompress( &amp;lt;binary-array&amp;gt; )]] -- Uncompress a binary variable data&lt;br /&gt;
* [[Core Function BinaryToLower|BinaryToLower( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to lowercase&lt;br /&gt;
* [[Core Function BinaryToUpper|BinaryToUpper( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to uppercase&lt;br /&gt;
* [[Core Function BinaryTrim|BinaryTrim( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left or right&lt;br /&gt;
* [[Core Function BinaryTrimLeft|BinaryTrimLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left&lt;br /&gt;
* [[Core Function BinaryTrimRight|BinaryTrimRight( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the right&lt;br /&gt;
* [[Core Function BinaryStripNull|BinaryStripNull( &amp;lt;binary-array&amp;gt; )]] -- Strip all NULL bytes (0x00) from a binary variable&lt;br /&gt;
* [[Core Function BinaryUUEncode|BinaryUUEncode( &amp;lt;binary-array&amp;gt; )]] -- Encodes a binary variable using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinaryUUDecode|BinaryUUDecode( &amp;lt;binary-array&amp;gt; )]] -- Decodes a binary variable that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinarySave|BinarySave( &amp;lt;binary-array&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Save a binary variable data to file&lt;br /&gt;
* [[Core Function BinaryLoad|BinaryLoad( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new binary variable by loading binary data from a file&lt;br /&gt;
&lt;br /&gt;
===== Binary packer/unpacker =====&lt;br /&gt;
* [[Core Function Pack|Pack( &amp;lt;format&amp;gt;, &amp;lt;args&amp;gt; )]] -- Pack data into a binary array&lt;br /&gt;
* [[Core Function Unpack|Unpack( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Unpack data from a binary array&lt;br /&gt;
* [[Core Function PackSingle|PackSingle( &amp;lt;format&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pack a single value into a binary array&lt;br /&gt;
* [[Core Function UnpackSingle|UnpackSingle( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;position&amp;gt; )]] -- Unpack a single value from a binary array optionally from a given index&lt;br /&gt;
&lt;br /&gt;
===== Bit Vector =====&lt;br /&gt;
* [[Core Function Vec|Vec( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;bits&amp;gt; )]] -- Treats binary variable as a bit vector made up of elements of width bits and returns the value of the element specified by offset as an unsigned integer and optionally sets bits in the string to a given value&lt;br /&gt;
&lt;br /&gt;
===== Bits =====&lt;br /&gt;
* [[Core Function SetBit|SetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the bit at a given index&lt;br /&gt;
* [[Core Function GetBit|GetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the bit at a given index&lt;br /&gt;
* [[Core Function InvertBit|InvertBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Invert the bit at a given index&lt;br /&gt;
* [[Core Function ClearBit|ClearBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Clear the bit at a given index&lt;br /&gt;
* [[Core Function FillBit|FillBit( &amp;lt;binary-array&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set all bits to the value&lt;br /&gt;
&lt;br /&gt;
===== BinHex 5.0 =====&lt;br /&gt;
* [[Core Function BinHexEncode|BinHexEncode( &amp;lt;name&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;creator&amp;gt;, &amp;lt;resourceFork&amp;gt;, &amp;lt;dataFork&amp;gt;, &amp;lt;flag1&amp;gt;, &amp;lt;flag2&amp;gt; )]] -- Encode data (usually a file) to BinHex 5.0 format&lt;br /&gt;
* [[Core Function BinHexDecode|BinHexDecode( &amp;lt;binhex-binary&amp;gt; )]] -- Decode data (usually a file) from BinHex 5.0 format&lt;br /&gt;
&lt;br /&gt;
===== ByteBuffer =====&lt;br /&gt;
The ByteBuffer is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc it works similar to the ByteBuffer in Java&lt;br /&gt;
* [[Core Function ByteBufferNew|ByteBufferNew( &amp;lt;nothing/capacity/binary/byteBuffer&amp;gt; )]] -- Make a new ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferGet|ByteBufferGet( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get data from a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPut|ByteBufferPut( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;variable&amp;gt; )]] -- Add data to a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPeek|ByteBufferPeek( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt; )]] -- Peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* [[Core Function ByteBufferGetBinary|ByteBufferGetBinary( &amp;lt;byteBuffer&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt; )]] -- Get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* [[Core Function ByteBufferCapacity|ByteBufferCapacity( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferRewind|ByteBufferRewind( &amp;lt;byteBuffer&amp;gt; )]] -- Set the position of a ByteBuffer back to the start&lt;br /&gt;
* [[Core Function ByteBufferLimit|ByteBufferLimit( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPosition|ByteBufferPosition( &amp;lt;byteBuffer&amp;gt;, &amp;lt;newPosition&amp;gt; )]] -- Get and set the position of a ByteBuffer to any value&lt;br /&gt;
* [[Core Function ByteBufferRemaining|ByteBufferRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferHasRemaining|ByteBufferHasRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferClear|ByteBufferClear( &amp;lt;byteBuffer&amp;gt; )]] -- Clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferFlip|ByteBufferFlip( &amp;lt;byteBuffer&amp;gt; )]] -- Flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferMark|ByteBufferMark( &amp;lt;byteBuffer&amp;gt; )]] -- Mark the position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferReset|ByteBufferReset( &amp;lt;byteBuffer&amp;gt; )]] -- Reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferCompare|ByteBufferCompare( &amp;lt;byteBuffer&amp;gt;, &amp;lt;byteBuffer&amp;gt; )]] -- Compare two ByteBuffers to see if they are equal&lt;br /&gt;
* [[Core Function ByteBufferClone|ByteBufferClone( &amp;lt;byteBuffer&amp;gt; )]] -- Clone a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferToBinary|ByteBufferToBinary( &amp;lt;byteBuffer&amp;gt; )]] -- Return a new binary variable from the data contained within the ByteBuffer&lt;br /&gt;
&lt;br /&gt;
===== NBT (Named Binary Tag) =====&lt;br /&gt;
Functions on par with Minecrafts NBT system but greatly expanded to include many additional features and improvements specific for Sputnik.&lt;br /&gt;
* [[Core Function NBT|NBT( &amp;lt;value&amp;gt; )]] -- Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* [[Core Function NBTNew|NBTNew( &amp;lt;nbt-type&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* [[Core Function NBTCompare|NBTCompare( &amp;lt;nbt&amp;gt;, &amp;lt;nbt&amp;gt; )]] -- Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* [[Core Function NBTCopy|NBTCopy( &amp;lt;nbt&amp;gt; )]] -- Make a clone of an NBT&lt;br /&gt;
* [[Core Function NBTGetId|NBTGetId( &amp;lt;nbt&amp;gt; )]] -- Get the ID type of an NBT&lt;br /&gt;
* [[Core Function NBTGetName|NBTGetName( &amp;lt;nbt&amp;gt; )]] -- Get the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTSetName|NBTGetName( &amp;lt;nbt&amp;gt;, &amp;lt;new-name&amp;gt; )]] -- Set the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTHash|NBTHash( &amp;lt;nbt&amp;gt; )]] -- Compute the CRC32 hash of an NBT&lt;br /&gt;
* [[Core Function NBTToString|NBTToString( &amp;lt;nbt&amp;gt; )]] -- Return a string representation of an NBT&lt;br /&gt;
* [[Core Function NBTToVar|NBTToVar( &amp;lt;nbt&amp;gt; )]] -- Return the Sputnik variable representation of an NBT&lt;br /&gt;
* [[Core Function IsVarNBT|IsVarNBT( &amp;lt;value&amp;gt; )]] -- Check if a variable is contains an NBT&lt;br /&gt;
&lt;br /&gt;
====== NBTTagCompound ======&lt;br /&gt;
* [[Core Function NBTCompoundClear|NBTCompoundClear( &amp;lt;nbtCompound&amp;gt; )]] -- Clear all tags&lt;br /&gt;
* [[Core Function NBTCompoundCount|NBTCompoundCount( &amp;lt;nbtCompound&amp;gt; )]] -- Return the amount of tags&lt;br /&gt;
* [[Core Function NBTCompoundGet|NBTCompoundGet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Get a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundSet|NBTCompoundSet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundGetKeys|NBTCompoundGetKeys( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all keys&lt;br /&gt;
* [[Core Function NBTCompoundGetTags|NBTCompoundGetTags( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all tags&lt;br /&gt;
* [[Core Function NBTCompoundGetMap|NBTCompoundGetMap( &amp;lt;nbtCompound&amp;gt; )]] -- Get an associative array of all keys and tags&lt;br /&gt;
* [[Core Function NBTCompoundHasKey|NBTCompoundHasKey( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Check if a given tag exists by name&lt;br /&gt;
* [[Core Function NBTCompoundIsEmpty|NBTCompoundIsEmpty( &amp;lt;nbtCompound&amp;gt; )]] -- Check if there are no tags&lt;br /&gt;
* [[Core Function NBTCompoundRemove|NBTCompoundRemove( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Remove a specific tag by name&lt;br /&gt;
* [[Core Function NBTCompoundWrite|NBTCompoundWrite( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundRead|NBTCompoundRead( &amp;lt;binary-variable/buffer&amp;gt; )]] -- Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundWriteFile|NBTCompoundWriteFile( &amp;lt;nbtCompound&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;compression )]] -- Write the NBTTagCompound to a file&lt;br /&gt;
* [[Core Function NBTCompoundReadFile|NBTCompoundReadFile( &amp;lt;file&amp;gt; )]] -- Create a new NBTTagCompound from reading a file&lt;br /&gt;
* [[Core Function NBTCompoundCompress|NBTCompoundCompress( &amp;lt;nbtCompound&amp;gt; )]] -- Compress the NBTTagCompound to binary&lt;br /&gt;
* [[Core Function NBTCompoundDecompress|NBTCompoundDecompress( &amp;lt;binary-variable&amp;gt; )]] -- Decompress a NBTTagCompound from binary&lt;br /&gt;
* [[Core Function NBTCompoundWriteCompressed|NBTCompoundWriteCompressed( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* [[Core Function NBTCompoundReadCompressed|NBTCompoundReadCompressed( &amp;lt;buffer&amp;gt; )]] -- Decompress a NBTTagCompound from a buffer&lt;br /&gt;
&lt;br /&gt;
====== NBTTagList/NBTTagListEx ======&lt;br /&gt;
* [[Core Function NBTListAppend|NBTListAppend( &amp;lt;nbtList&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add an NBT to the end of the list&lt;br /&gt;
* [[Core Function NBTListCount|NBTListCount( &amp;lt;nbtList&amp;gt; )]] -- Return how many tags exist in the list&lt;br /&gt;
* [[Core Function NBTListGet|NBTListGet( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get a tag at the given index&lt;br /&gt;
* [[Core Function NBTListHasId|NBTListHasId( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an index is valid and contains a tag&lt;br /&gt;
* [[Core Function NBTListRemove|NBTListRemove( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
===== Misc Binary Functions =====&lt;br /&gt;
* [[Core Function TB|TB( &amp;lt;string&amp;gt; )]] -- Convert a string of up to 4 chars into a 32-Bit unsigned number (network order)&lt;br /&gt;
* [[Core Function BT|BT( &amp;lt;number&amp;gt; )]] -- Convert a 32-Bit unsigned number (network order) into a string&lt;br /&gt;
&lt;br /&gt;
==== Bit Flag Functions ====&lt;br /&gt;
* [[Core Function HasFlag|HasFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt; )]] -- Check if a flag (or array of flags) is enabled in a given enum instance&lt;br /&gt;
* [[Core Function HasFlagAny|HasFlagAny( &amp;lt;enumInst&amp;gt;, &amp;lt;flags&amp;gt;... )]] -- Check if any flag is enabled in a given enum instance&lt;br /&gt;
* [[Core Function SetFlag|SetFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt;, &amp;lt;state&amp;gt; )]] -- Enable or Disable a flag (or array of flags) in a given enum instance&lt;br /&gt;
&lt;br /&gt;
==== Math Functions ====&lt;br /&gt;
* [[Core Function Abs|Abs( &amp;lt;expression&amp;gt; )]] -- Calculates the absolute value of a number&lt;br /&gt;
* [[Core Function ACos|ACos( &amp;lt;expression&amp;gt; )]] -- Calculates the arcCosine of a number&lt;br /&gt;
* [[Core Function ASin|ASin( &amp;lt;expression&amp;gt; )]] -- Calculates the arcsine of a number&lt;br /&gt;
* [[Core Function ATan|ATan( &amp;lt;expression&amp;gt; )]] -- Calculates the arctangent of a number&lt;br /&gt;
* [[Core Function ATan2|ATan2( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Compute arc tangent with two parameters&lt;br /&gt;
* [[Core Function Angle2D|Angle2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Calculates the angle of a line defined by two points on a 2D surface&lt;br /&gt;
* [[Core Function Barycentric|Barycentric( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;amount1&amp;gt;, &amp;lt;amount2&amp;gt; )]] -- Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates&lt;br /&gt;
* [[Core Function CatmullRom|CatmullRom( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;value4&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Catmull-Rom interpolation using the specified positions&lt;br /&gt;
* [[Core Function BaseConv|BaseConv( &amp;lt;number&amp;gt;, &amp;lt;frombase&amp;gt;, &amp;lt;tobase&amp;gt; )]] -- Convert a number between arbitrary bases&lt;br /&gt;
* [[Core Function BitAND|BitAND( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise AND operation&lt;br /&gt;
* [[Core Function BitNOT|BitNOT( &amp;lt;expression&amp;gt; )]] -- Performs a bitwise NOT operation&lt;br /&gt;
* [[Core Function BitOR|BitOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise OR operation&lt;br /&gt;
* [[Core Function BitSHIFT|BitSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a bit shifting operation&lt;br /&gt;
* [[Core Function BitTripleSHIFT|BitTripleSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a triple bit shifting operation&lt;br /&gt;
* [[Core Function BitXOR|BitXOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise exclusive OR (XOR) operation&lt;br /&gt;
* [[Core Function BitROTATE|BitROTATE( &amp;lt;expression&amp;gt;, &amp;lt;shift&amp;gt;, &amp;lt;size&amp;gt; )]] -- Performs a bit shifting operation, with rotation&lt;br /&gt;
* [[Core Function BitSwap|BitSwap( &amp;lt;expression&amp;gt; )]] -- Byte-swap (little-endian &amp;lt;-&amp;gt; big-endian)&lt;br /&gt;
* [[Core Function Ceiling|Ceiling( &amp;lt;expression&amp;gt; )]] -- Returns a number rounded up to the next integer&lt;br /&gt;
* [[Core Function Clamp|Clamp( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Clamps the specified value&lt;br /&gt;
* [[Core Function Cos|Cos( &amp;lt;expression&amp;gt; )]] -- Calculates the cosine of a number&lt;br /&gt;
* [[Core Function Cosh|Cosh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic cosine of the specified angle&lt;br /&gt;
* [[Core Function DegreesToRadians|DegreesToRadians( &amp;lt;value&amp;gt; )]] -- Converts degrees to radians&lt;br /&gt;
* [[Core Function DegreesToRevolutions|DegreesToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts degrees to revolutions&lt;br /&gt;
* [[Core Function DiffCalc|DiffCalc( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;isDouble&amp;gt; )]] -- Calculates the difference between two values and returns information about it that can help you convert the first into the second for future needs&lt;br /&gt;
* [[Core Function Distance|Distance( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt; )]] -- Calculates the absolute value of the difference of two values&lt;br /&gt;
* [[Core Function Distance2D|Distance2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Finds the distance between two points on a 2D surface&lt;br /&gt;
* [[Core Function Distance3D|Distance3D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;z1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;z2&amp;gt; )]] -- Finds the distance between two points on a 3D surface&lt;br /&gt;
* [[Core Function Exp|Exp( &amp;lt;expression&amp;gt; )]] -- Returns e raised to the specified power&lt;br /&gt;
* [[Core Function Floor|Floor( &amp;lt;expression&amp;gt; )]] -- Returns the largest integer less than or equal to the specified number&lt;br /&gt;
* [[Core Function frexp|frexp( &amp;lt;x&amp;gt; )]] -- Returns m and e such that x = m2e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero)&lt;br /&gt;
* [[Core Function Gauss|Gauss( &amp;lt;amplitude&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;radX&amp;gt;, &amp;lt;radY&amp;gt;, &amp;lt;sigmaX&amp;gt;, &amp;lt;sigmaY&amp;gt; )]] -- Get the result of the Gaussian function&lt;br /&gt;
* [[Core Function GradiansToRevolutions|GradiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts gradians to revolutions&lt;br /&gt;
* [[Core Function GradiansToDegrees|GradiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts gradians to degrees&lt;br /&gt;
* [[Core Function GradiansToRadians|GradiansToRadians( &amp;lt;value&amp;gt; )]] -- Converts gradians to radians&lt;br /&gt;
* [[Core Function Hermite|Hermite( &amp;lt;value1&amp;gt;, &amp;lt;tangent1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;tangent2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Hermite spline interpolation&lt;br /&gt;
* [[Core Function IsDivisible|IsDivisible( &amp;lt;expression&amp;gt;, &amp;lt;divisor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* [[Core Function IsOdd|IsOdd( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an odd number&lt;br /&gt;
* [[Core Function IsEven|IsEven( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an even number&lt;br /&gt;
* [[Core Function IntToRom|IntToRom( &amp;lt;expression&amp;gt; )]] -- Returns the roman numerical value of an integer&lt;br /&gt;
* [[Core Function ldexp|ldexp( &amp;lt;m&amp;gt;, &amp;lt;n&amp;gt; )]] -- Returns the value of m * 2^n&lt;br /&gt;
* [[Core Function Lerp|Lerp( &amp;lt;from&amp;gt;, &amp;lt;to&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a linear function by a given amount&lt;br /&gt;
* [[Core Function Log|Log( &amp;lt;expression&amp;gt;, &amp;lt;newbase&amp;gt; )]] -- Returns the logarithm of a specified number&lt;br /&gt;
* [[Core Function Log10|Log10( &amp;lt;expression&amp;gt; )]] -- Returns the common (base-10) logarithm of a specified number&lt;br /&gt;
* [[Core Function Math|Math( &amp;lt;expression&amp;gt; )]] -- Parse a string containing mathematical equations&lt;br /&gt;
* [[Core Function Max|Max( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the greater number and return it&lt;br /&gt;
* [[Core Function Min|Min( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the lesser number and return it&lt;br /&gt;
* [[Core Function Mod|Mod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the modulus operation&lt;br /&gt;
* [[Core Function Modf|Modf( &amp;lt;x&amp;gt;, &amp;lt;intpart&amp;gt; )]] -- Breaks x into an integral and a fractional part&lt;br /&gt;
* [[Core Function Mod2PI|Mod2PI( &amp;lt;value&amp;gt; )]] -- Calculates the modulo 2*PI of the specified value&lt;br /&gt;
* [[Core Function MatlabMod|MatlabMod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the Matlab modulus operation&lt;br /&gt;
* [[Core Function OffsetCalc|OffsetCalc( &amp;lt;size&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Calculate the START and LENGTH of an array index&lt;br /&gt;
* [[Core Function Pow|Pow( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Returns a specified number raised to the specified power&lt;br /&gt;
* [[Core Function RadiansToDegrees|RadiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts radians to degrees&lt;br /&gt;
* [[Core Function RadiansToRevolutions|RadiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts radians to revolutions&lt;br /&gt;
* [[Core Function RadiansToGradians|RadiansToGradians( &amp;lt;value&amp;gt; )]] -- Converts radians to gradians&lt;br /&gt;
* [[Core Function Random|Random( &amp;lt;minValue&amp;gt;, &amp;lt;maxValue&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get a random number from the defined area&lt;br /&gt;
* [[Core Function RandomVar|RandomVar( &amp;lt;seed&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Generator a random number&lt;br /&gt;
* [[Core Function RandomSeed|RandomSeed( &amp;lt;flag&amp;gt;, &amp;lt;size&amp;gt; )]] -- Generator a cryptographically strong random number for use as a seed&lt;br /&gt;
* [[Core Function RandomSeedSet|RandomSeedSet( &amp;lt;seed&amp;gt; )]] -- Set the seed of Sputniks random number generator&lt;br /&gt;
* [[Core Function RevolutionsToDegrees|RevolutionsToDegrees( &amp;lt;value&amp;gt; )]] -- Converts revolutions to degrees.&lt;br /&gt;
* [[Core Function RevolutionsToRadians|RevolutionsToRadians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to radians.&lt;br /&gt;
* [[Core Function RevolutionsToGradians|RevolutionsToGradians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to gradians.&lt;br /&gt;
* [[Core Function Round|Round( &amp;lt;expression&amp;gt;, &amp;lt;decimalplaces&amp;gt; )]] -- Returns a number rounded to a specified number of decimal places&lt;br /&gt;
* [[Core Function RomToInt|RomToInt( &amp;lt;expression&amp;gt; )]] -- Returns the integer value of a roman numerical sequence&lt;br /&gt;
* [[Core Function Sin|Sin( &amp;lt;expression&amp;gt; )]] -- Returns the sine of the specified angle&lt;br /&gt;
* [[Core Function Sinh|Sinh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic sine of the specified angle&lt;br /&gt;
* [[Core Function SmoothStep|SmoothStep( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a cubic equation&lt;br /&gt;
* [[Core Function Sqrt|Sqrt( &amp;lt;expression&amp;gt; )]] -- Returns the square root of a specified number&lt;br /&gt;
* [[Core Function Sum|Sum( &amp;lt;expressions&amp;gt; )]] -- Returns the sum of all the parameters&lt;br /&gt;
* [[Core Function Tan|Tan( &amp;lt;expression&amp;gt; )]] -- Returns the tangent of the specified angle&lt;br /&gt;
* [[Core Function Tanh|Tanh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic tangent of the specified angle&lt;br /&gt;
* [[Core Function Truncate|Truncate( &amp;lt;expression&amp;gt; )]] -- Calculates the integral part of a specified decimal number&lt;br /&gt;
* [[Core Function WithinEpsilson|WithinEpsilson( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;epsilon&amp;gt; )]] -- Checks if value1 - value2 are almost equals within a float epsilon.&lt;br /&gt;
* [[Core Function Wrap|Wrap( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Wraps the specified value into a range&lt;br /&gt;
* [[Core Function WrapAngle|WrapAngle( &amp;lt;value&amp;gt; )]] -- Reduces a given angle to a value between π and -π.&lt;br /&gt;
* [[Core Function IsPrime|IsPrime( &amp;lt;expression&amp;gt; )]] -- Check if a number is a Prime number&lt;br /&gt;
&lt;br /&gt;
==== String Functions ====&lt;br /&gt;
* [[Core Function AddCSlashes|AddCSlashes( &amp;lt;str&amp;gt;, &amp;lt;charlist&amp;gt; )]] -- Escape a string with slashes in a C style&lt;br /&gt;
* [[Core Function AddBR|AddBR( &amp;lt;str&amp;gt; )]] -- Add HTML breaks to strings at newlines&lt;br /&gt;
* [[Core Function Asc|Asc( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function AscW|AscW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function AscArray|AscArray( &amp;lt;char&amp;gt; )]] -- Returns an array of ASCII characters of a string&lt;br /&gt;
* [[Core Function AscWArray|AscWArray( &amp;lt;char&amp;gt; )]] -- Returns an array of UNICODE characters of a string&lt;br /&gt;
* [[Core Function Between|Between( &amp;lt;haystack&amp;gt;, &amp;lt;firstneedle&amp;gt;, &amp;lt;secondneedle&amp;gt;, &amp;lt;case&amp;gt; )]] -- Return the text between a start and end substring&lt;br /&gt;
* [[Core Function BCrypt|BCrypt( &amp;lt;expression&amp;gt;, &amp;lt;rounds&amp;gt; )]] -- Hash a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function BCryptVerify|BCryptVerify( &amp;lt;expression&amp;gt;, &amp;lt;hash&amp;gt; )]] -- Verify a hash to a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function CSetMatch|CSetMatch( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Check if a string contains only characters from a substring(charset)&lt;br /&gt;
* [[Core Function CSetDel|CSetDel( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Delete all characters found in the charset from a string&lt;br /&gt;
* [[Core Function ChunkSplit|ChunkSplit( &amp;lt;body&amp;gt;, &amp;lt;chunklen&amp;gt;, &amp;lt;end&amp;gt; )]] -- Split a string into smaller chunks&lt;br /&gt;
* [[Core Function Chop|Chop( &amp;lt;variable&amp;gt; )]] -- Removes and returns the last character from a string&lt;br /&gt;
* [[Core Function Chomp|Chomp( &amp;lt;variable&amp;gt; )]] -- Removes trailing newlines and returns the number of characters removed&lt;br /&gt;
* [[Core Function CountChars|CountChars( &amp;lt;string&amp;gt; )]] -- Return information about characters used in a string&lt;br /&gt;
* [[Core Function CountWords|CountWords( &amp;lt;string&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;charlist&amp;gt;, &amp;lt;outputArray&amp;gt; )]] -- Return information about words used in a string&lt;br /&gt;
* [[Core Function Chr|Chr( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an ASCII code&lt;br /&gt;
* [[Core Function ChrW|ChrW( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an UNICODE code&lt;br /&gt;
* [[Core Function ChrArray|ChrArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array ASCII codes&lt;br /&gt;
* [[Core Function ChrWArray|ChrWArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array UNICODE codes&lt;br /&gt;
* [[Core Function CRC32|CRC32( &amp;lt;string&amp;gt; )]] -- Calculates the crc32 polynomial of a string&lt;br /&gt;
* [[Core Function Crypt|Crypt( &amp;lt;string&amp;gt;, &amp;lt;salt&amp;gt; )]] -- One-way string hashing&lt;br /&gt;
* [[Core Function Contains|Contains( &amp;lt;srting&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains a sub string&lt;br /&gt;
* [[Core Function ContainsAny|ContainsAny( &amp;lt;srting&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains any of the given strings from an array&lt;br /&gt;
* [[Core Function CountFields|CountFields( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns the number of values (fields) in the string passed that are separated by the separator string passed&lt;br /&gt;
* [[Core Function CSV|CSV( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Split strings and parse a CSV text into an array&lt;br /&gt;
* [[Core Function DecOct|DecOct( &amp;lt;expression&amp;gt; )]] -- Decimal to octal&lt;br /&gt;
* [[Core Function Dec|Dec( &amp;lt;expression&amp;gt; )]] -- Returns a integer representation of a hexadecimal string&lt;br /&gt;
* [[Core Function FDec|FDec( &amp;lt;expression&amp;gt; )]] -- Returns a float representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DDec|DDec( &amp;lt;expression&amp;gt; )]] -- Returns a double representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DecPad|DecPad( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pads numeric string to a given number of chars (Filling in the gap with zeros)&lt;br /&gt;
* [[Core Function DecryptString|DecryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Decrypt a string with a given password&lt;br /&gt;
* [[Core Function Decode64|Decode64( &amp;lt;expression&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Decodes string with MIME base64&lt;br /&gt;
* [[Core Function Encode64|Encode64( &amp;lt;expression&amp;gt; )]] -- Encodes string with MIME base64&lt;br /&gt;
* [[Core Function Escape|Escape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to a string&lt;br /&gt;
* [[Core Function EscapeMeta|EscapeMeta( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to meta characters&lt;br /&gt;
* [[Core Function EscapeShellArg|EscapeShellArg( &amp;lt;arg&amp;gt; )]] -- Escape a string to be used as a shell argument&lt;br /&gt;
* [[Core Function EscapeShellCmd|EscapeShellCmd( &amp;lt;command&amp;gt; )]] -- Escape shell metacharacters&lt;br /&gt;
* [[Core Function EncryptString|EncryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Encrypt a string with a given password&lt;br /&gt;
* [[Core Function EndsWith|EndsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string ends with a substring&lt;br /&gt;
* [[Core Function Hash|Hash( &amp;lt;expression&amp;gt; )]] -- Generate a unique hash code for a string value&lt;br /&gt;
* [[Core Function Hebrev|Hebrev( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text&lt;br /&gt;
* [[Core Function Hebrevc|Hebrevc( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text with newline conversion&lt;br /&gt;
* [[Core Function Hex2Str|Hex2Str( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a hex string back to a normal string&lt;br /&gt;
* [[Core Function Hex|Hex( &amp;lt;expression&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a string representation of an integer type converted to hexadecimal&lt;br /&gt;
* [[Core Function HTMLTranslationTable|HTMLTranslationTable( &amp;lt;the_table&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt; )]] -- Returns the translation table used by HTMLSpecialChars() and HTMLEntities()&lt;br /&gt;
* [[Core Function HTMLEntities|HTMLEntities( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all applicable characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLEntityDecode|HTMLEntityDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all HTML entities to their applicable characters&lt;br /&gt;
* [[Core Function HTMLSpecialChars|HTMLSpecialChars( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert special characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLSpecialCharsDecode|HTMLSpecialCharsDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Convert special HTML entities back to characters &lt;br /&gt;
* [[Core Function HTTPMakeQuery|HTTPMakeQuery( &amp;lt;array&amp;gt; )]] -- Converts an array into a properly formatted HTTP query string for use with requests etc&lt;br /&gt;
* [[Core Function HTTPParseQuery|HTTPParseQuery( &amp;lt;string&amp;gt; )]] -- Parse an HTTP query string into an array&lt;br /&gt;
* [[Core Function Fmt|Fmt( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a formatted string&lt;br /&gt;
* [[Core Function FmtNumber|FmtNumber( &amp;lt;number&amp;gt;, &amp;lt;decimals&amp;gt;, &amp;lt;dec_point&amp;gt;, &amp;lt;thousands_sep&amp;gt; )]] -- Format a number with grouped thousands&lt;br /&gt;
* [[Core Function FHex|FHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an float type converted to hexadecimal&lt;br /&gt;
* [[Core Function DHex|DHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an double type converted to hexadecimal&lt;br /&gt;
* [[Core Function Find|Find( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;plain&amp;gt; )]] -- Search for a match in a string and return the match with its found position and length&lt;br /&gt;
* [[Core Function GMatch|GMatch( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;asKeypair&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Extract the patterns from a string and return as array or associative array&lt;br /&gt;
* [[Core Function GSub|GSub( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;repl&amp;gt;, &amp;lt;max&amp;gt; )]] -- Returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function)&lt;br /&gt;
* [[Core Function InStr|InStr( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Checks if a string contains a given substring&lt;br /&gt;
* [[Core Function InStrRev|InStrRev( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Same as InStr() but searches from right to left instead of left to right&lt;br /&gt;
* [[Core Function isAlpha|isAlpha( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only Alphabetic characters&lt;br /&gt;
* [[Core Function isAlphaNumeric|isAlphaNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters&lt;br /&gt;
* [[Core Function isASCII|isASCII( &amp;lt;expression&amp;gt; )]] -- Check if string contains only ASCII chars&lt;br /&gt;
* [[Core Function isControl|isControl( &amp;lt;expression&amp;gt; )]] -- Check if string contains only control chars&lt;br /&gt;
* [[Core Function isEmpty|isEmpty( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty&lt;br /&gt;
* [[Core Function isEmptyOrNull|isEmptyOrNull( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty or if the variable is null or if the variable translates to false (zero)&lt;br /&gt;
* [[Core Function IsGraph|IsGraph( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely only characters that have a graphical representation&lt;br /&gt;
* [[Core Function isDigit|isDigit( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers&lt;br /&gt;
* [[Core Function isFloat|isFloat( &amp;lt;expression&amp;gt; )]] -- Check if string contains a floating point and could be converted&lt;br /&gt;
* [[Core Function isLower|isLower( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only lowercase letters&lt;br /&gt;
* [[Core Function isNumeric|isNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers (Allows for float/double)&lt;br /&gt;
* [[Core Function isSpace|isSpace( &amp;lt;expression&amp;gt; )]] -- Check if string contains only whitespace&lt;br /&gt;
* [[Core Function isSymbol|isSymbol( &amp;lt;expression&amp;gt; )]] -- Check if string contains only symbol chars&lt;br /&gt;
* [[Core Function IsPunctuation|IsPunctuation( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a punctuation marks&lt;br /&gt;
* [[Core Function IsSeparator|IsSeparator( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a separator character&lt;br /&gt;
* [[Core Function IsBlank|IsBlank( &amp;lt;expression&amp;gt; )]] -- Check if string contains only spaces and tabs&lt;br /&gt;
* [[Core Function isString|isString( &amp;lt;expression&amp;gt; )]] -- Check if variable contains only string chars&lt;br /&gt;
* [[Core Function isUpper|isUpper( &amp;lt;expression&amp;gt; )]] -- Check if string contains only uppercase chars&lt;br /&gt;
* [[Core Function isXDigit|isXDigit( &amp;lt;expression&amp;gt; )]] -- Check if string contains only hex chars&lt;br /&gt;
* [[Core Function IndexOf|IndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of the specified string in a string&lt;br /&gt;
* [[Core Function IndexOfAny|IndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function IndexNotOf|IndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function IndexNotOfAny|IndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexOf|LastIndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexOfAny|LastIndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexNotOf|LastIndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexNotOfAny|LastIndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function JsonEncode|JsonEncode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Returns the JSON representation of a value&lt;br /&gt;
* [[Core Function JsonDecode|JsonDecode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Decodes a JSON string&lt;br /&gt;
* [[Core Function Levenshtein|Levenshtein( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;cost_ins&amp;gt;, &amp;lt;cost_rep&amp;gt;, &amp;lt;cost_de&amp;gt; )]] -- Calculate Levenshtein distance between two strings&lt;br /&gt;
* [[Core Function LC|LC( &amp;lt;expression&amp;gt; )]] -- Returns string in all lower case&lt;br /&gt;
* [[Core Function LCFirst|LCFirst( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of string&lt;br /&gt;
* [[Core Function LCLast|LCLast( &amp;lt;expression&amp;gt; )]] -- Lower Cases last letter of string&lt;br /&gt;
* [[Core Function LCWords|LCWords( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of each word in string&lt;br /&gt;
* [[Core Function Left|Left( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the left-hand side of a string&lt;br /&gt;
* [[Core Function Lines|Lines( &amp;lt;expression&amp;gt; )]] -- Returns an array containing all the lines from a string&lt;br /&gt;
* [[Core Function Match|Match( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Search for the first match of pattern in a string if found return the captures from the pattern&lt;br /&gt;
* [[Core Function Metaphone|Metaphone( &amp;lt;string&amp;gt;, &amp;lt;phonemes&amp;gt; )]] -- Calculate the metaphone key of a string&lt;br /&gt;
* [[Core Function MD5|MD5( &amp;lt;expression&amp;gt; )]] -- Creates MD5 Hash of specified string&lt;br /&gt;
* [[Core Function NthField|NthField( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns a field from a row of data (such as comma separated text)&lt;br /&gt;
* [[Core Function Ord|Ord( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function OrdW|OrdW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function Oct|Oct( &amp;lt;string&amp;gt; )]] -- Converts an octal string into the numerical corresponding value&lt;br /&gt;
* [[Core Function PadLeft|PadLeft( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the left of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PadRight|PadRight( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the right of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PrintableEncode|PrintableEncode( &amp;lt;string )]] -- Convert a quoted-printable string to an 8 bit string&lt;br /&gt;
* [[Core Function PrintableDecode|PrintableDecode( &amp;lt;string )]] -- Convert a 8 bit string to a quoted-printable string&lt;br /&gt;
* [[Core Function RandStr|RandStr( &amp;lt;count&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Generate a random sequence of characters at a given length&lt;br /&gt;
* [[Core Function RegexMatch|RegexMatch( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;matches&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression match&lt;br /&gt;
* [[Core Function RegexReplace|RegexReplace( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;limit&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression search and replace&lt;br /&gt;
* [[Core Function RegexEscape|RegexEscape( &amp;lt;expression&amp;gt;, &amp;lt;delimiter&amp;gt; )]] -- Escape regular expression characters&lt;br /&gt;
* [[Core Function RegexUnescape|RegexUnescape( &amp;lt;expression&amp;gt; )]] -- Remove any escapes regular expression characters&lt;br /&gt;
* [[Core Function ResolveStr|ResolveStr( &amp;lt;expression&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Treat a given string as if it was a Sputnik &amp;quot;string&amp;quot; and parse all stuff inside it such as $variables etc&lt;br /&gt;
* [[Core Function Repeat|Repeat( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new string or new array containing repeats of a string provided&lt;br /&gt;
* [[Core Function Replace|Replace( &amp;lt;expression&amp;gt;, &amp;lt;find&amp;gt;, &amp;lt;replace&amp;gt;, &amp;lt;case-sensitive-flag&amp;gt; )]] -- Replace substrings within a string with other strings&lt;br /&gt;
* [[Core Function Reverse|Reverse( &amp;lt;expression&amp;gt; )]] -- Reverse all characters in a string&lt;br /&gt;
* [[Core Function RevHex|RevHex( &amp;lt;expression&amp;gt; )]] -- Reverse a string of hex digits&lt;br /&gt;
* [[Core Function Right|Right( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the right-hand side of a string&lt;br /&gt;
* [[Core Function Rot13|Rot13( &amp;lt;str&amp;gt; )]] -- Perform the rot13 transform on a string&lt;br /&gt;
* [[Core Function Scanf|Scanf( &amp;lt;expression&amp;gt;, &amp;lt;def&amp;gt; )]] -- Parses input from a string according to a format&lt;br /&gt;
* [[Core Function SHA1|SHA1( &amp;lt;expression&amp;gt; )]] -- Returns SHA1 hash of string&lt;br /&gt;
* [[Core Function Serialize|Serialize( &amp;lt;variable&amp;gt; )]] -- Convert a variable, array, class etc a string you can save to file or transfer over the internet&lt;br /&gt;
* [[Core Function SimilarText|SimilarText( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;percent&amp;gt; )]] -- Calculates the similarity between two input strings and return a percentage of the matching between the two input strings&lt;br /&gt;
* [[Core Function Split|Split( &amp;lt;expression&amp;gt;, &amp;lt;delim/pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Splits up a string into substrings depending on the given delimiters.&lt;br /&gt;
* [[Core Function SPrintf|SPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function)&lt;br /&gt;
* [[Core Function StartsWith|StartsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string starts with a substring&lt;br /&gt;
* [[Core Function StrChr|StrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate first occurrence of character in string&lt;br /&gt;
* [[Core Function StrrChr|StrrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate last occurrence of character in string&lt;br /&gt;
* [[Core Function StrShuffle|StrShuffle( &amp;lt;str&amp;gt; )]] --  Randomly shuffles a string&lt;br /&gt;
* [[Core Function Strpbrk|Strpbrk( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate a list of possible characters in string and return the position of it&lt;br /&gt;
* [[Core Function StripCSlashes|StripCSlashes( &amp;lt;str&amp;gt; )]] -- Unescape string escaped with AddCSlashes()&lt;br /&gt;
* [[Core Function StripTags|StripTags( &amp;lt;str&amp;gt;, &amp;lt;allowable_tags&amp;gt; )]] -- Strip HTML tags from a string&lt;br /&gt;
* [[Core Function StripWS|StripWS( &amp;lt;str&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;charList&amp;gt; )]] -- Strips the white space in a string or given characters.&lt;br /&gt;
* [[Core Function StrSpn|StrSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask&lt;br /&gt;
* [[Core Function StrCSpn|StrCSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Find length of initial segment not matching mask&lt;br /&gt;
* [[Core Function StrCmp|StrCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- String comparison&lt;br /&gt;
* [[Core Function StrNatCmp|StrNatCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparisons using a &amp;quot;natural order&amp;quot; algorithm&lt;br /&gt;
* [[Core Function StrVersCmp|StrVersCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparison holding name and indices/version numbers&lt;br /&gt;
* [[Core Function Soundex|Soundex( &amp;lt;str&amp;gt; )]] -- Calculate the soundex key of a string&lt;br /&gt;
* [[Core Function Str2Hex|Str2Hex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to a hex string&lt;br /&gt;
* [[Core Function StrNew|StrNew( &amp;lt;char&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; ]] -- Create a new string of a given length filled with a given char&lt;br /&gt;
* [[Core Function StrInsert|StrInsert( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Insert a string at a given index of another string and return the new string&lt;br /&gt;
* [[Core Function StrIndex|StrIndex( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get or set a char from/to a string at a specific index&lt;br /&gt;
* [[Core Function StrIncrement|StrIncrement( &amp;lt;str&amp;gt; )]] -- Increment a string the same way as doing ++ on a string like $a++&lt;br /&gt;
* [[Core Function StrPos|StrPos( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the position of the first/last occurrence of a substring in a string&lt;br /&gt;
* [[Core Function StrTr|StrTr( &amp;lt;str&amp;gt;, &amp;lt;from-to/replace_pairs&amp;gt; )]] -- Translate characters or replace substrings&lt;br /&gt;
* [[Core Function StrTok|StrTok( &amp;lt;str/token&amp;gt;, &amp;lt;token&amp;gt; )]] -- Tokenize string&lt;br /&gt;
* [[Core Function StrStr|StrStr( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;before_needle&amp;gt;, &amp;lt;find_last&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first/last occurrence of a string&lt;br /&gt;
* [[Core Function StrLen|StrLen( &amp;lt;expression&amp;gt; )]] -- Returns length of specified string&lt;br /&gt;
* [[Core Function SubStr|SubStr( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function SubStrCount|SubStrCount( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Count the number of substring occurrences&lt;br /&gt;
* [[Core Function SubStrCmp|SubStrCmp( &amp;lt;main_str&amp;gt;, &amp;lt;str&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Comparison of two strings from an offset, up to length characters&lt;br /&gt;
* [[Core Function SubStrReplace|SubStrReplace( &amp;lt;expression&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace text within a portion of a string&lt;br /&gt;
* [[Core Function Sub|Sub( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function StrSplit|StrSplit( &amp;lt;expression&amp;gt;, &amp;lt;split_length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to an array&lt;br /&gt;
* [[Core Function StrCompress|StrCompress( &amp;lt;expression&amp;gt; )]] -- Compress a string&lt;br /&gt;
* [[Core Function StrUncompress|StrUncompress( &amp;lt;expression&amp;gt; )]] -- Uncompress a string&lt;br /&gt;
* [[Core Function Trim|Trim( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Removes whitespace from the beginning and end of a string&lt;br /&gt;
* [[Core Function TrimLeft|TrimLeft( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the start of a string&lt;br /&gt;
* [[Core Function TrimRight|TrimRight( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the end of a string&lt;br /&gt;
* [[Core Function TrimToNull|TrimToNull( &amp;lt;string&amp;gt; )]] -- Strip all zero chars (nulls) from the end of a string&lt;br /&gt;
* [[Core Function UC|UC( &amp;lt;expression&amp;gt; )]] -- Returns string in all Upper Case&lt;br /&gt;
* [[Core Function UCFirst|UCFirst( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of string&lt;br /&gt;
* [[Core Function UCLast|UCLast( &amp;lt;expression&amp;gt; )]] -- Upper Cases last letter of string&lt;br /&gt;
* [[Core Function UCWords|UCWords( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of each word in string&lt;br /&gt;
* [[Core Function UUEncode|UUEncode( &amp;lt;expression&amp;gt; )]] -- Encodes a string using the uuencode algorithm&lt;br /&gt;
* [[Core Function UUDecode|UUDecode( &amp;lt;expression&amp;gt; )]] -- Decodes a string that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function Unescape|Unescape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Remove all escapes from a string&lt;br /&gt;
* [[Core Function Unserialize|Unserialize( &amp;lt;string&amp;gt; )]] -- Convert a string (Created with Serialize()) into its original variable/class/array etc&lt;br /&gt;
* [[Core Function UrlEncodeBytes|UrlEncodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Cnvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function UrlDecodeBytes|UrlDecodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Convert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function VSPrintf|VSPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function) but accepts arrays as the arguments&lt;br /&gt;
* [[Core Function WordWrap|WordWrap( &amp;lt;str&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;break&amp;gt;, &amp;lt;cut&amp;gt; )]] -- Wraps a string to a given number of characters&lt;br /&gt;
&lt;br /&gt;
==== Array Functions ====&lt;br /&gt;
* [[Core Function SameValues|SameValues( &amp;lt;array&amp;gt; )]] -- Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* [[Core Function ArrayScope|ArrayScope( &amp;lt;array&amp;gt;, &amp;lt;scope&amp;gt; )]] -- Get or Set an arrays internal Sputnik scope (Only to be used by Sputnik library developers)&lt;br /&gt;
* [[Core Function IsHash|IsHash( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Strings rather than numeric (Making it a full hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsHashAny|IsHashAny( &amp;lt;array&amp;gt; )]] -- Check if any of the keys in an array are Strings rather than numeric (Making it a possible hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsArray|IsArray( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Numeric and none are String (Making it a full array rather than full hashmap or mixed)&lt;br /&gt;
* [[Core Function IsList|IsList( &amp;lt;array&amp;gt; )]] -- Same as IsArray but also checks to make sure the keys start at 0 and end at the highest with no gaps which makes it a perfect list&lt;br /&gt;
* [[Core Function Array|Array( &amp;lt;expressions&amp;gt; )]] -- Create a new array&lt;br /&gt;
* [[Core Function Clear|Clear( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Remove all items from an array&lt;br /&gt;
* [[Core Function Join|Join( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array into a string with an optional separator&lt;br /&gt;
* [[Core Function JoinKV|JoinKV( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array (as keys and values) into a string with an optional separator&lt;br /&gt;
* [[Core Function Count|Count( &amp;lt;array/binary-array/class&amp;gt; )]] -- Returns the size of array (How many elements it currently has stored)&lt;br /&gt;
* [[Core Function Fill|Fill( &amp;lt;start&amp;gt;, &amp;lt;num&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values&lt;br /&gt;
* [[Core Function FillKeys|FillKeys( &amp;lt;keys&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values, specifying keys&lt;br /&gt;
* [[Core Function UBound|UBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the highest element in an array&lt;br /&gt;
* [[Core Function LBound|LBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the lowest element in an array&lt;br /&gt;
* [[Core Function Push|Push( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the end of an array&lt;br /&gt;
* [[Core Function PushArray|PushArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the end of an array&lt;br /&gt;
* [[Core Function Insert|Insert( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to an array at a given location&lt;br /&gt;
* [[Core Function InsertArray|InsertArray( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;arrays&amp;gt; )]] -- Add arrays to an array at a given location&lt;br /&gt;
* [[Core Function Pad|Pad( &amp;lt;array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pad array to the specified length with a value&lt;br /&gt;
* [[Core Function Unshift|Unshift( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the beginning of an array&lt;br /&gt;
* [[Core Function UnshiftArray|UnshiftArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the beginning of an array&lt;br /&gt;
* [[Core Function Pop|Pop( &amp;lt;array&amp;gt; )]] -- Delete the last item in an array&lt;br /&gt;
* [[Core Function Shift|Shift( &amp;lt;array&amp;gt; )]] -- Delete the first item in an array&lt;br /&gt;
* [[Core Function Range|Range( &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;step&amp;gt; )]] -- Create an array containing a range of elements&lt;br /&gt;
* [[Core Function Remove|Remove( &amp;lt;array&amp;gt;, &amp;lt;start-id&amp;gt;, &amp;lt;end-id&amp;gt; )]] -- Delete items from an array starting at a given location and stopping at a given location&lt;br /&gt;
* [[Core Function RemoveValue|RemoveValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific value or all matching values from an array&lt;br /&gt;
* [[Core Function RemoveValues|RemoveValues( &amp;lt;array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of specific values from an array&lt;br /&gt;
* [[Core Function RemoveKey|RemoveKey( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific key from an array&lt;br /&gt;
* [[Core Function RemoveKeys|RemoveKeys( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of keys from an recursively from an array&lt;br /&gt;
* [[Core Function IsIndexSet|IsIndexSet( &amp;lt;array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an element exist at a given index ID within an array&lt;br /&gt;
* [[Core Function Grep|Grep( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays values that match the given regex pattern&lt;br /&gt;
* [[Core Function GrepKeys|GrepKeys( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays keys that match the given regex pattern&lt;br /&gt;
* [[Core Function Search|Search( &amp;lt;array&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;invert_flag&amp;gt;, &amp;lt;returnKeys&amp;gt; )]] -- Returns a new array consisting of the elements of the input array that match the given value&lt;br /&gt;
* [[Core Function Combine|Combine( &amp;lt;array-keys&amp;gt;, &amp;lt;array-values&amp;gt; )]] -- Creates a hash (Dictionary) by using the values from the keys array as keys and the values from the values array as the corresponding values&lt;br /&gt;
* [[Core Function Walk|Walk( &amp;lt;array&amp;gt;, &amp;lt;function&amp;gt; )]] -- Walk through the arrays items and execute a user defined function on each one&lt;br /&gt;
* [[Core Function Rev|Rev( &amp;lt;array&amp;gt; )]] -- Returns a new array consisting of the reverse of another array&lt;br /&gt;
* [[Core Function IsKeySet|IsKeySet( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt; )]] -- Check if given key exists within an array&lt;br /&gt;
* [[Core Function IsKeysSet|IsKeysSet( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if any/all/none of a given key from a key array was found inside an array&lt;br /&gt;
* [[Core Function Keys|Keys( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all KEYS from an array&lt;br /&gt;
* [[Core Function Values|Values( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all VALUES from an array&lt;br /&gt;
* [[Core Function InArray|InArray( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Checks if a value exists in an array&lt;br /&gt;
* [[Core Function Flip|Flip( &amp;lt;array&amp;gt; )]] -- Exchanges all keys with their associated values in an array&lt;br /&gt;
* [[Core Function Splice|Splice( &amp;lt;array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;replace_with&amp;gt; )]] -- Cut out and return a chunk or portion of an array and optionally replace the cut out section with new data.&lt;br /&gt;
* [[Core Function Order|Order( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Fix the order of numeric array elements from 0 to whatever.&lt;br /&gt;
* [[Core Function Sort|Sort( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Sort an array by value or keys optionally modify it in place or return new and optionally use a custom function to decide how to sort it&lt;br /&gt;
* [[Core Function CountValues|CountValues( &amp;lt;array&amp;gt; )]] -- Counts all the values of an array&lt;br /&gt;
* [[Core Function SumKeys|SumKeys( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the keys of an array&lt;br /&gt;
* [[Core Function SumValues|SumValues( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the values of an array&lt;br /&gt;
* [[Core Function IndexOfValue|IndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexOfValueAny|IndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array) exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexNotOfValue|IndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the first index that does not contain the value&lt;br /&gt;
* [[Core Function IndexNotOfValueAny|IndexNotOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value (from an array) in an array and returns the first index that does not contain any of the values&lt;br /&gt;
* [[Core Function LastIndexOfValue|LastIndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns the index of the last occurrence of the value&lt;br /&gt;
* [[Core Function LastIndexOfValueAny|LastIndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array of values) exists in an array and returns the index of the last occurrence of the value (from the value array)&lt;br /&gt;
* [[Core Function LastIndexNotOfValue|LastIndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the last index that does not contain the value&lt;br /&gt;
&lt;br /&gt;
==== Linq (Integrated Language Query) Functions ====&lt;br /&gt;
These functions are basically quick ways to shuffle arrays around (sort and organize them etc) and are BEST suited for when the array contains nothing but Classes but you can use them on any array if you want.&lt;br /&gt;
* [[Core Function All|All( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of all elements in the query are a true match&lt;br /&gt;
* [[Core Function Any|Any( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of any of the elements in the query are a true match&lt;br /&gt;
* [[Core Function Concat|Concat( &amp;lt;array&amp;gt;, &amp;lt;array&amp;gt;... )]] -- Join multiple arrays (query results?) together&lt;br /&gt;
* [[Core Function First|First( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the first matching element from the query&lt;br /&gt;
* [[Core Function FirstOrDefault|FirstOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the first matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Last|Last( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the last matching element from the query&lt;br /&gt;
* [[Core Function LastOrDefault|LastOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the last matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Where|Where( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and returns all matching&lt;br /&gt;
* [[Core Function WhereNot|WhereNot( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and all non matching&lt;br /&gt;
* [[Core Function SumInt|SumInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as an Int64&lt;br /&gt;
* [[Core Function SumUInt|SumUInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a UInt64&lt;br /&gt;
* [[Core Function SumDouble|SumDouble( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a Double&lt;br /&gt;
* [[Core Function Obtain|Obtain( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Gathers up all matching elements from the query and returns them (Unlike Where() this returns the values directly instead of their source so instead of returning the class it will return the variable)&lt;br /&gt;
&lt;br /&gt;
==== Enum Functions ====&lt;br /&gt;
* [[Core Function Enumerate|Enumerate( &amp;lt;enum&amp;gt; )]] -- Cycle through all Name + Values in an enum&lt;br /&gt;
* [[Core Function EnumKey|EnumKey( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the string KEY for a given integer value&lt;br /&gt;
* [[Core Function EnumValue|EnumValue( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the integer value for a given string KEY&lt;br /&gt;
* [[Core Function EnumAdd|EnumAdd( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add a new key and value to an existing enum&lt;br /&gt;
* [[Core Function EnumDel|EnumDel( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt; )]] -- Delete a key and value from an existing enum&lt;br /&gt;
* [[Core Function EnumIsDefined|EnumIsDefined( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a given value exists within an enum&lt;br /&gt;
&lt;br /&gt;
==== Process Functions ====&lt;br /&gt;
* [[Core Function DLLCall|DLLCall( &amp;lt;Dll/DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt;, &amp;lt;Parms&amp;gt; )]] -- Dynamically call a function in a DLL&lt;br /&gt;
* [[Core Function DLLOpen|DLLOpen( &amp;lt;DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt; )]] -- Open a DLL and get a function from it and return it as a ready to call object function that is already compiled (vastly speeding up the repeat call speed)&lt;br /&gt;
* [[Core Function DLLClose|DLLClose( &amp;lt;DLL&amp;gt; )]] -- Close and unset a return value from DLLOpen()&lt;br /&gt;
* [[Core Function DLLImport|DLLImport( &amp;lt;varies...&amp;gt; )]] -- Dynamically load a function from a DLL and transform it to act and behave like a normal Sputnik function (Can load thousands functions at a time and even save the loaded stuff to DLL for quick access later)&lt;br /&gt;
* [[Core Function Exec|Exec( &amp;lt;command&amp;gt;, &amp;lt;output&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program&lt;br /&gt;
* [[Core Function ExecShell|ExecShell( &amp;lt;command&amp;gt; )]] -- Execute command via shell and return the complete output as a string&lt;br /&gt;
* [[Core Function ExecSystem|ExecSystem( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display the output&lt;br /&gt;
* [[Core Function Passthru|Passthru( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display raw output&lt;br /&gt;
* [[Core Function System|System( &amp;lt;expression&amp;gt; )]] -- Execute system command&lt;br /&gt;
* [[Core Function Run|Run( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program&lt;br /&gt;
* [[Core Function RunWait|RunWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program and waits until the program finishes&lt;br /&gt;
* [[Core Function RunShell|RunShell( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute)&lt;br /&gt;
* [[Core Function RunShellWait|RunShellWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute) and waits until the program finishes&lt;br /&gt;
* [[Core Function RunAsSet|RunAsSet( &amp;lt;user&amp;gt;, &amp;lt;domain&amp;gt;, &amp;lt;password&amp;gt;, &amp;lt;options&amp;gt; )]] -- Initialise a set of user credentials to use during Run and RunWait operations.&lt;br /&gt;
* [[Core Function RunCapture|RunCapture( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Run a program in a hidden window and capture its printed output as strings&lt;br /&gt;
* [[Core Function PHandle|PHandle( )]] -- Get the process handle of this program&lt;br /&gt;
* [[Core Function ProcessClose|ProcessClose( &amp;lt;pid/name&amp;gt; )]] -- Terminates a named process&lt;br /&gt;
* [[Core Function ProcessID|ProcessID( &amp;lt;name&amp;gt; )]] -- Gets the process ID of a given name&lt;br /&gt;
* [[Core Function ProcessExists|ProcessExists( &amp;lt;pid/name&amp;gt; )]] -- Checks to see if a specified process exists&lt;br /&gt;
* [[Core Function ProcessList|ProcessList( &amp;lt;name&amp;gt; )]] -- Returns an array listing the currently running processes (names and PIDs)&lt;br /&gt;
* [[Core Function ProcessSetPriority|ProcessSetPriority( &amp;lt;pid/name&amp;gt;, &amp;lt;priority&amp;gt; )]] -- Changes the priority of a process&lt;br /&gt;
* [[Core Function ProcessWait|ProcessWait( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process exists or optional the timeout expires&lt;br /&gt;
* [[Core Function ProcessWaitClose|ProcessWaitClose( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process no longer exists or optional the timeout expires&lt;br /&gt;
* [[Core Function Shutdown|Shutdown( &amp;lt;shutdown code&amp;gt; )]] -- Shuts down the system&lt;br /&gt;
* [[Core Function Debug|Debug( &amp;lt;flag&amp;gt; )]] -- Enter or leave debug mode in debug state the program can interact with operating system processes that run in a special mode by enabling the native property SeDebugPrivilege on the current thread&lt;br /&gt;
&lt;br /&gt;
==== Environment Management ====&lt;br /&gt;
* [[Core Function EnvExpand|EnvExpand( &amp;lt;expression&amp;gt; )]] -- Convert a string containing %name% env tags and return complete string with names resolved&lt;br /&gt;
* [[Core Function EnvGet|EnvGet( &amp;lt;tag&amp;gt; )]] -- Get the value of an environment variable&lt;br /&gt;
* [[Core Function EnvSet|EnvSet( &amp;lt;tag&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set the value of an environment variable&lt;br /&gt;
* [[Core Function EnvUpdate|EnvUpdate( )]] -- Refreshes the OS environment&lt;br /&gt;
&lt;br /&gt;
==== File Functions ====&lt;br /&gt;
&lt;br /&gt;
===== File Create/Read/Write Functions =====&lt;br /&gt;
* [[Core Function FileOpen|FileOpen( &amp;lt;FileName&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Opens a file for reading or writing&lt;br /&gt;
* [[Core Function FileOpenText|FileOpenText( &amp;lt;FileName&amp;gt; )]] -- Opens a file for reading only (text files only)&lt;br /&gt;
* [[Core Function FileClose|FileClose( &amp;lt;file&amp;gt; )]] -- Closes a previously opened file&lt;br /&gt;
* [[Core Function FileWrite|FileWrite( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write text to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteBinary|FileWriteBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Write the data from a binary variable to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteLines|FileWriteLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write an array of lines to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileAppend|FileAppend( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append a line of text to the end of a previously opened text file&lt;br /&gt;
* [[Core Function FileAppendBinary|FileAppendBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Append the data from a binary variable to the end of a previously opened file&lt;br /&gt;
* [[Core Function FileAppendLines|FileAppendLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append an array of lines to the end of previously opened file&lt;br /&gt;
* [[Core Function FileSeek|FileSeek( &amp;lt;file&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Change the POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FilePos|FilePos( &amp;lt;file&amp;gt; )]] -- Get the current POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FileRead|FileRead( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a text file starting from current File Steam pointer location and return them as a string&lt;br /&gt;
* [[Core Function FileReadBinary|FileReadBinary( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a file starting from current File Steam pointer location&lt;br /&gt;
* [[Core Function FileReadLine|FileReadLine( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a line of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadLines|FileReadLines( &amp;lt;file&amp;gt; )]] -- Read all lines of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadText|FileReadText( &amp;lt;file&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;length&amp;gt; )]] -- Read text from a file opened by FileOpenText() using the format and length params&lt;br /&gt;
* [[Core Function FileTemp|FileTemp(  )]] -- Create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* [[Core Function FileSave|FileSave( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Save all text to a file&lt;br /&gt;
* [[Core Function FileLoad|FileLoad( &amp;lt;file&amp;gt; )]] -- Load all text from a file&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function FileMove|FileMove( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Move a file&lt;br /&gt;
* [[Core Function FileCopy|FileCopy( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Copy a file&lt;br /&gt;
* [[Core Function FileDelete|FileDelete( &amp;lt;file&amp;gt; )]] -- Delete a file&lt;br /&gt;
* [[Core Function FileExists|FileExists( &amp;lt;file&amp;gt; )]] -- Check if a given file exists&lt;br /&gt;
* [[Core Function FileCreationTime|FileCreationTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the creation time of a file&lt;br /&gt;
* [[Core Function FileWriteTime|FileWriteTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last write time of a file&lt;br /&gt;
* [[Core Function FileAccessTime|FileAccessTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last access time of a file&lt;br /&gt;
* [[Core Function FileEncrypt|FileEncrypt( &amp;lt;file&amp;gt; )]] -- Encrypt a file so only the windows account used to encrypt it can decrypt it&lt;br /&gt;
* [[Core Function FileDecrypt|FileDecrypt( &amp;lt;file&amp;gt; )]] -- Decrypt a file previously encrypted by this windows user account&lt;br /&gt;
* [[Core Function FileMD5|FileMD5( &amp;lt;file&amp;gt; )]] -- Calculate the MD5 checksum of a file&lt;br /&gt;
* [[Core Function FileSHA1|FileSHA1( &amp;lt;file&amp;gt; )]] -- Calculate the SHA1 checksum of a file&lt;br /&gt;
* [[Core Function FileSize|FileSize( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns the file size in bytes (or return the formatted size)&lt;br /&gt;
* [[Core Function FileIsText|FileIsText( &amp;lt;file&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns true if the file contains only text&lt;br /&gt;
* [[Core Function FileRecycleEmpty|FileRecycleEmpty( &amp;lt;root&amp;gt; )]] -- Empty the recycle bin with no GUI, sound or confirmation&lt;br /&gt;
* [[Core Function FileRecycle|FileRecycle( &amp;lt;filename&amp;gt; )]] -- Move a file or directory to the recycle bin&lt;br /&gt;
* [[Core Function FileMatch|FileMatch( &amp;lt;pattern&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Match filename against a Glob pattern&lt;br /&gt;
&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FileSaveDialog|FileSaveDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Save File Dialog&lt;br /&gt;
* [[Core Function FileOpenDialog|FileOpenDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Load File Dialog&lt;br /&gt;
&lt;br /&gt;
==== Directory Functions ====&lt;br /&gt;
* [[Core Function GetFiles|GetFiles ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all files in a directory&lt;br /&gt;
* [[Core Function GetFolders|GetFolders ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all folders in a directory&lt;br /&gt;
* [[Core Function Glob|Glob( &amp;lt;pattern&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Find files/folders matching a pattern&lt;br /&gt;
* [[Core Function MKDir|MKDir ( &amp;lt;path&amp;gt; )]] -- Creates all directories and subdirectories as specified by path&lt;br /&gt;
* [[Core Function RMDir|RMDir ( &amp;lt;path&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Deletes the specified directory and, if indicated, any subdirectories in the directory&lt;br /&gt;
* [[Core Function DirExists|DirExists ( &amp;lt;path&amp;gt; )]] -- Determines whether the given path refers to an existing directory on disk&lt;br /&gt;
* [[Core Function DirCopy|DirCopy ( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Copies a directory and all sub-directories and files (Similar to xcopy)&lt;br /&gt;
* [[Core Function DirMove|DirMove( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Moves a directory to another location&lt;br /&gt;
* [[Core Function DirSize|DirSize( &amp;lt;path&amp;gt; )]] -- Returns the size in bytes of a whole directory&lt;br /&gt;
* [[Core Function CurDir|CurDir ( &amp;lt;path&amp;gt; )]] -- Get or Set the current working directory&lt;br /&gt;
* [[Core Function CombinePath|CombinePath( &amp;lt;path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Safe way to combine two paths into one&lt;br /&gt;
* [[Core Function GetRelativePath|GetRelativePath( &amp;lt;Path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Try makes a path relative to another&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FolderSelectDialog|FolderSelectDialog ( &amp;lt;text&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;init dir&amp;gt; )]] -- Initiates a Browse For Folder Dialog&lt;br /&gt;
&lt;br /&gt;
==== Path Functions ====&lt;br /&gt;
* [[Core Function ParsePath|ParsePath ( &amp;lt;path&amp;gt; )]] -- Resolve a file name and locate its full path&lt;br /&gt;
* [[Core Function HasExtension|HasExtension ( &amp;lt;path&amp;gt; )]] -- Determines whether a path includes a file name extension&lt;br /&gt;
* [[Core Function GetFullPath|GetFullPath ( &amp;lt;path&amp;gt; )]] -- Returns the absolute path for the specified path string&lt;br /&gt;
* [[Core Function GetDirectoryName|GetDirectoryName ( &amp;lt;path&amp;gt; )]] -- Returns the directory information for the specified path string&lt;br /&gt;
* [[Core Function GetExtension|GetExtension ( &amp;lt;path&amp;gt; )]] -- Returns the extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileName|GetFileName ( &amp;lt;path&amp;gt; )]] -- Returns the file name and extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileNameWithoutExtension|GetFileNameWithoutExtension ( &amp;lt;path&amp;gt; )]] -- Returns the file name of the specified path string without the extension&lt;br /&gt;
* [[Core Function GetPathRoot|GetPathRoot ( &amp;lt;path&amp;gt; )]] -- Gets the root directory information of the specified path&lt;br /&gt;
* [[Core Function IsPathRooted|IsPathRooted ( &amp;lt;path&amp;gt; )]] -- Gets a value indicating whether the specified path string contains absolute or relative path information&lt;br /&gt;
* [[Core Function GetDosPath|GetDosPath( &amp;lt;path&amp;gt; )]] -- Returns a given path in DOS friendly style (shortened)&lt;br /&gt;
* [[Core Function AddPath|AddPath( &amp;lt;path&amp;gt; )]] -- Add a directory to the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
* [[Core Function DelPath|DelPath( &amp;lt;path&amp;gt; )]] -- Remove a directory from the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
&lt;br /&gt;
==== Network Functions ====&lt;br /&gt;
&lt;br /&gt;
===== HTTP Functions =====&lt;br /&gt;
* [[Core Function HTTPFileExists|HTTPFileExists( &amp;lt;url&amp;gt; )]] -- Check if a file exists at a given URL&lt;br /&gt;
* [[Core Function HTTPGetString|HTTPGetString( &amp;lt;url&amp;gt; )]] -- Copy all text from a URL and return it as a string&lt;br /&gt;
* [[Core Function HTTPDownload|HTTPDownload( &amp;lt;url&amp;gt;, &amp;lt;dest&amp;gt;, &amp;lt;progress&amp;gt;, &amp;lt;completed&amp;gt;, &amp;lt;param&amp;gt; )]] -- Download a file from a given URL&lt;br /&gt;
&lt;br /&gt;
===== MySQL Functions =====&lt;br /&gt;
* [[Core Function MySQLConnect|MySQLConnect( &amp;lt;ip/ip:port&amp;gt;, &amp;lt;login&amp;gt;, &amp;lt;password&amp;gt; )]] -- Connect to a MySQL database&lt;br /&gt;
* [[Core Function MySQLSelectDB|MySQLSelectDB( &amp;lt;mysql&amp;gt;, &amp;lt;db name&amp;gt; )]] -- Select a database&lt;br /&gt;
* [[Core Function MySQLQuery|MySQLQuery( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Execute a query&lt;br /&gt;
* [[Core Function MySQLFill|MySQLFill( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Grab a table or parts of it from the Database&lt;br /&gt;
* [[Core Function MySQLFetch|MySQLFetch( &amp;lt;mysql data&amp;gt; )]] -- Fetch the next row from a table&lt;br /&gt;
* [[Core Function MySQLFetchReset|MySQLFetchReset( &amp;lt;mysql data&amp;gt; )]] -- Reset the current position in the table rows to 0&lt;br /&gt;
* [[Core Function MySQLFields|MySQLFields( &amp;lt;mysql data&amp;gt; )]] -- Return how many Fields are in the table&lt;br /&gt;
* [[Core Function MySQLRows|MySQLRows( &amp;lt;mysql data&amp;gt; )]] -- Return how many Rows are in the table&lt;br /&gt;
* [[Core Function MySQLClose|MySQLClose( &amp;lt;mysql&amp;gt; )]] -- Close a MySQL connection&lt;br /&gt;
&lt;br /&gt;
===== Sputnik Client/Server Functions (This is just for connecting Sputnik Clients to Sputnik Servers nothing else) =====&lt;br /&gt;
* [[Core Function SSListen|SSListen( &amp;lt;port&amp;gt;, &amp;lt;max connections&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Create a server and begin listening for clients to connect&lt;br /&gt;
* [[Core Function SSConnect|SSConnect( &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;connection string&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Connect to a server&lt;br /&gt;
* [[Core Function SSApprove|SSApprove( &amp;lt;client socket&amp;gt; )]] -- Approve a client to connect to the server&lt;br /&gt;
* [[Core Function SSDisapprove|SSDisapprove( &amp;lt;client socket&amp;gt; )]] -- Disapprove a client to connect to the server&lt;br /&gt;
* [[Core Function SSClientStatus|SSClientStatus( &amp;lt;client/client socket&amp;gt; )]] -- Get the status of a client or of our client&lt;br /&gt;
* [[Core Function SSClientIP|SSClientIP( &amp;lt;client socket&amp;gt; )]] -- Get the IP of a client socket&lt;br /&gt;
* [[Core Function SSRecv|SSRecv( &amp;lt;server/client&amp;gt; )]] -- Check for a message recieved from client/server&lt;br /&gt;
* [[Core Function SSRead|SSRead( &amp;lt;client/server&amp;gt;, &amp;lt;data type&amp;gt; )]] --Read data from a client/server&lt;br /&gt;
* [[Core Function SSDrop|SSDrop( &amp;lt;client socket&amp;gt;, &amp;lt;reason&amp;gt; )]] -- Kick a client off the server&lt;br /&gt;
* [[Core Function SSSend|SSSend( /* depends... /* )]] -- Send data to client or server&lt;br /&gt;
* [[Core Function SSBufferNew|SSBufferNew( &amp;lt;nothing/server/client&amp;gt; )]] -- Create a new net buffer to store data to send to the client/server&lt;br /&gt;
* [[Core Function SSBufferPut|SSBufferPut( &amp;lt;netBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Add data to a net buffer&lt;br /&gt;
&lt;br /&gt;
===== Raw Sockets (TCP/UDP etc) =====&lt;br /&gt;
* [[Core Function SocketAccept|SocketAccept( &amp;lt;socket&amp;gt;  )]] -- Creates a new &amp;lt;socket&amp;gt; for a newly created connection&lt;br /&gt;
* [[Core Function SocketAvailable|SocketAvailable( &amp;lt;socket&amp;gt;  )]] -- Gets the amount of data that has been received from the network and is available to be read&lt;br /&gt;
* [[Core Function SocketBind|SocketBind( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Associates a &amp;lt;socket&amp;gt; with a local endpoint&lt;br /&gt;
* [[Core Function SocketClose|SocketClose( &amp;lt;socket&amp;gt;, &amp;lt;wait&amp;gt;  )]] -- Closes the &amp;lt;socket&amp;gt; connection and releases all associated resources&lt;br /&gt;
* [[Core Function SocketConnect|SocketConnect( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Establishes a connection to a remote host&lt;br /&gt;
* [[Core Function SocketConnected|SocketConnected( &amp;lt;socket&amp;gt; )]] -- Checks if a socket is connected and ready for use or not&lt;br /&gt;
* [[Core Function SocketCreate|SocketCreate( &amp;lt;sockettype&amp;gt;, &amp;lt;protocoltype&amp;gt;, &amp;lt;addressfamily&amp;gt; )]] -- Create a new &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketListen|SocketListen( &amp;lt;socket&amp;gt;, &amp;lt;backlog&amp;gt;  )]] -- Places a &amp;lt;socket&amp;gt; in a listening state&lt;br /&gt;
* [[Core Function SocketReceive|SocketReceive( &amp;lt;socket&amp;gt;, &amp;lt;buffersize&amp;gt;  )]] -- Receives data from a bound &amp;lt;socket&amp;gt; into a receive buffer&lt;br /&gt;
* [[Core Function SocketReadChar|SocketReadChar( &amp;lt;socket&amp;gt;, &amp;lt;count&amp;gt;  )]] -- Receives a single (or a specified amount) of char(s) from a bound &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketReadLine|SocketReadLine( &amp;lt;socket&amp;gt;  )]] -- Receives the next line from a bound &amp;lt;socket&amp;gt; (useful for Telnet style stuff)&lt;br /&gt;
* [[Core Function SocketSend|SocketSend( &amp;lt;socket&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketSendTo|SocketSendTo( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to the specified ip + port&lt;br /&gt;
* [[Core Function SocketSendFile|SocketSendFile( &amp;lt;socket&amp;gt;, &amp;lt;file-name&amp;gt;  )]] -- Sends a file as data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIP|SocketIP( &amp;lt;socket&amp;gt;, &amp;lt;remote/local&amp;gt;  )]] -- Get the Remote or Local IP of a socket&lt;br /&gt;
* [[Core Function SocketShutdown|SocketShutdown( &amp;lt;socket&amp;gt;, &amp;lt;shutdown-type&amp;gt;  )]] -- Disables sends and receives on a &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketPoll|SocketPoll( &amp;lt;socket&amp;gt;, &amp;lt;milliseconds&amp;gt;, &amp;lt;type&amp;gt;  )]] -- Sends a kind of ping to determine the status of the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketHandle|SocketHandle( &amp;lt;socket&amp;gt; )]] -- Gets the operating system handle for the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIsBound|SocketIsBound( &amp;lt;socket&amp;gt; )]] -- Gets a value that indicates whether the &amp;lt;socket&amp;gt; is bound to a specific local port&lt;br /&gt;
* [[Core Function SocketOpt|SocketOpt( &amp;lt;socket&amp;gt;, &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt;  )]] -- Get or Set a setting on a &amp;lt;socket&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Misc Network Functions =====&lt;br /&gt;
* [[Core Function HostResolve|HostResolve( &amp;lt;host name&amp;gt; )]] -- Resolves a host name such as google.com into an IP address&lt;br /&gt;
* [[Core Function Ping|Ping( &amp;lt;ip address/host name&amp;gt; )]] -- Pings a host and returns the roundtrip-time&lt;br /&gt;
&lt;br /&gt;
==== Memory Functions ====&lt;br /&gt;
* [[Core Function Alloc|Alloc( &amp;lt;size&amp;gt;, &amp;lt;filler&amp;gt; )]] -- Allocate memory and return the pointer to it&lt;br /&gt;
* [[Core Function Realloc|Realloc( &amp;lt;ptr&amp;gt;, &amp;lt;size&amp;gt; )]] -- Resizes a block of memory previously allocated with Alloc()&lt;br /&gt;
* [[Core Function Free|Free( &amp;lt;ptr&amp;gt; )]] -- Deallocate memory from a pointer&lt;br /&gt;
* [[Core Function StringToPTR|StringToPTR( &amp;lt;type&amp;gt;, &amp;lt;string&amp;gt; )]] -- Allocates memory for the string and writes the string to that memory and returns the pointer for that memory&lt;br /&gt;
* [[Core Function PTRToString|PTRToString( &amp;lt;type&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a string from a memory pointer&lt;br /&gt;
* [[Core Function PTRRead|PTRRead( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Read data from a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRWrite|PTRWrite( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;value&amp;gt; )]] -- Write data to a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRToDLLStruct|PTRToDLLStruct( &amp;lt;def string&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a DLLStruct from a memory pointer&lt;br /&gt;
* [[Core Function DLLStructCreateDef|DLLStructCreateDef( &amp;lt;name&amp;gt;, &amp;lt;def string&amp;gt; )]] -- Creates a named C/C++ style structure definition that can be used with DLLStructCreate and can also be placed inside other DLLStructs&lt;br /&gt;
* [[Core Function DLLStructGetDef|DLLStructGetDef( &amp;lt;name&amp;gt;/&amp;lt;dllstruct&amp;gt; )]] -- Return the &amp;lt;def string&amp;gt; of a given DLLStruct&lt;br /&gt;
* [[Core Function DLLStructCreate|DLLStructCreate( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructCreateUnion|DLLStructCreateUnion( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure (union) to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructGetData|DLLStructGetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the data of an element of the struct&lt;br /&gt;
* [[Core Function DLLStructSetData|DLLStructSetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Set the data of an element of the struct&lt;br /&gt;
* [[Core Function DllStructGetSize|DLLStructGetSize( &amp;lt;dllstruct&amp;gt; )]] -- Returns the size of the struct in bytes&lt;br /&gt;
* [[Core Function DllStructGetPtr|DLLStructGetPtr( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the pointer to the struct or an element in the struct or even a specific index of an array object within an elment&lt;br /&gt;
* [[Core Function DllStructGetVars|DLLStructGetVars( &amp;lt;dllstruct&amp;gt; )]] -- Create an array of all items and their array size with total byte size&lt;br /&gt;
&lt;br /&gt;
==== Clipboard Functions ====&lt;br /&gt;
* [[Core Function ClipGet|ClipGet( &amp;lt;type&amp;gt; )]] -- Get data from the clipboard&lt;br /&gt;
* [[Core Function ClipSet|ClipSet( &amp;lt;type&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set data to the clipboard&lt;br /&gt;
&lt;br /&gt;
==== Registry Functions ====&lt;br /&gt;
* [[Core Function RegRead|RegRead( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;default&amp;gt; )]] -- Reads a value from the registry&lt;br /&gt;
* [[Core Function RegWrite|RegWrite( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Sets a value in the registry&lt;br /&gt;
* [[Core Function RegDelete|RegDelete( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Delete a key or value from the registry&lt;br /&gt;
* [[Core Function RegKeyList|RegKeyList( &amp;lt;key&amp;gt; )]] -- Return an array of all the keys at this location in the registry&lt;br /&gt;
* [[Core Function RegValueList|RegValueList( &amp;lt;key&amp;gt; )]] -- Return an array of all the values at this location in the registry&lt;br /&gt;
* [[Core Function RegKeyExists|RegKeyExists( &amp;lt;key&amp;gt; )]] -- Check if a key exists in the registry&lt;br /&gt;
* [[Core Function RegValueExists|RegValueExists( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a key value in the registry&lt;br /&gt;
&lt;br /&gt;
==== Time &amp;amp; Date Functions ====&lt;br /&gt;
* [[Core Function Time|Time( &amp;lt;array&amp;gt; )]] -- Returns the current time or calculates the time in seconds from an associative array&lt;br /&gt;
* [[Core Function MicroTime|MicroTime( &amp;lt;returnAsDouble&amp;gt; )]] -- Returns the current Unix timestamp with microseconds&lt;br /&gt;
* [[Core Function Date|Date( &amp;lt;format&amp;gt;, &amp;lt;time&amp;gt; )]] -- Returns a string with the date and time formatted according to the format given. If no time is supplied defaults to the current time&lt;br /&gt;
* [[Core Function TimerInit|TimerInit( )]] -- Returns a handle that can be passed to TimerDiff() to calculate the difference in milliseconds&lt;br /&gt;
* [[Core Function TimerDiff|TimerDiff( &amp;lt;handle&amp;gt; )]] -- Returns the difference in time from a previous call to TimerInit()&lt;br /&gt;
* [[Core Function Sleep|Sleep( &amp;lt;milliseconds&amp;gt;, &amp;lt;doEvents&amp;gt; )]] -- Pause the current executing thread for the given milliseconds&lt;br /&gt;
* [[Core Function USleep|USleep( &amp;lt;microseconds&amp;gt; )]] -- Pause the current executing thread for the given microseconds&lt;br /&gt;
* [[Core Function TickCount|TickCount( &amp;lt;ticks&amp;gt; )]] -- Retrieves the number of milliseconds that have elapsed since the current instance of Sputnik was started&lt;br /&gt;
&lt;br /&gt;
==== Old GUI Functions ====&lt;br /&gt;
&lt;br /&gt;
All the functions below are part of the SputnikOldGUI.dll basically these functions are *to be* depreciated and replaced with something much better in the future.&lt;br /&gt;
&lt;br /&gt;
However you can still use these and even after they have been replaced with a new GUI system you will still be able to use these functions (and GUI programs made with them) anyway by using the SputnikOldGUI.dll into your project.&lt;br /&gt;
&lt;br /&gt;
To use any of these functions you must include the SputnikOldGUI.dll to do that you must add this code to the top of your script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of using &amp;quot;GUICreate&amp;quot; in a full example and including the SputnikOldGUI.dll&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Load the old GUI system&lt;br /&gt;
// Since this an old GUI example&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
// Create the GUI&lt;br /&gt;
Global $GUI = GUICreate(&amp;quot;Window&amp;quot;, &amp;quot;My Title&amp;quot;, 200, 200);&lt;br /&gt;
// Create a button -- This button will simply display a message&lt;br /&gt;
Global $Button = GUICreate(&amp;quot;Button&amp;quot;, $GUI, &amp;quot;Press Me!&amp;quot;, 8, 8);&lt;br /&gt;
// Add a link to the button&lt;br /&gt;
GUILink($Button, &amp;quot;Click&amp;quot;, 'myFunction();'); // Call function&lt;br /&gt;
// Show the GUI&lt;br /&gt;
GUILoad( $GUI );&lt;br /&gt;
// Keep the GUI running as long as long as the window is open&lt;br /&gt;
While ( GUIStatus( $GUI ) ) &lt;br /&gt;
	DoEvents( ); &lt;br /&gt;
// This function is called when the button is clicked&lt;br /&gt;
Function myFunction()&lt;br /&gt;
{&lt;br /&gt;
	MsgBox(&amp;quot;Hello from the button&amp;quot;);&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make note however that the examples below do not include the SputnikOldGUI.dll in their scripts you must do that part yourself!.&lt;br /&gt;
&lt;br /&gt;
===== Dialog Creation Functions =====&lt;br /&gt;
* [[Core Function GUIMDICreate|GUICreate( &amp;quot;MDIWindow&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI Multi-Document-Interface window&lt;br /&gt;
* [[Core Function GUICreate|GUICreate( &amp;quot;Window&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI window&lt;br /&gt;
* [[Core Function DoEvents|DoEvents( )]] -- Keep GUI windows active by dispatching all messages in the queue&lt;br /&gt;
* [[Core Function GUILoad|GUILoad( &amp;lt;GUI Window&amp;gt; )]] -- Load a GUI window and display it (Usually after creation or after GUIUnload)&lt;br /&gt;
* [[Core Function GUIUnload|GUIUnload( &amp;lt;GUI Window&amp;gt; )]] -- Unload a GUI window and hide it (GUILoad will bring it back)&lt;br /&gt;
* [[Core Function GUIMDIParent|GUIMDIParent( &amp;lt;GUI Window&amp;gt;, &amp;lt;GUI Window&amp;gt; )]] -- Set the parent window (An MDI window) for another window to be created inside it&lt;br /&gt;
&lt;br /&gt;
===== Control Creation Functions =====&lt;br /&gt;
* [[Core Function GUICreateButton|GUICreate( &amp;quot;Button&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Button&lt;br /&gt;
* [[Core Function GUICreateDataGrid|GUICreate( &amp;quot;DataGrid&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DataGrid&lt;br /&gt;
* [[Core Function GUICreateTimer|GUICreate( &amp;quot;Timer&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Interval&amp;gt; )]] -- Create a Timer&lt;br /&gt;
* [[Core Function GUICreateComboBox|GUICreate( &amp;quot;ComboBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ComboBox&lt;br /&gt;
* [[Core Function GUICreateTextBox|GUICreate( &amp;quot;TextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TextBox&lt;br /&gt;
* [[Core Function GUICreateTextBoxEx|GUICreate( &amp;quot;TextBoxEx&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Multiline TextBox&lt;br /&gt;
* [[Core Function GUICreateLabel|GUICreate( &amp;quot;Label&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Label&lt;br /&gt;
* [[Core Function GUICreateGroupBox|GUICreate( &amp;quot;GroupBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a GroupBox&lt;br /&gt;
* [[Core Function GUICreatePictureBox|GUICreate( &amp;quot;PictureBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a PictureBox&lt;br /&gt;
* [[Core Function GUICreateProgressBar|GUICreate( &amp;quot;ProgressBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ProgressBar&lt;br /&gt;
* [[Core Function GUICreateListBox|GUICreate( &amp;quot;ListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListBox&lt;br /&gt;
* [[Core Function GUICreateContextMenu|GUICreate( &amp;quot;ContextMenu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Context Menu which is used when right clicking the object&lt;br /&gt;
* [[Core Function GUICreateMenu|GUICreate( &amp;quot;Menu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Menu&lt;br /&gt;
* [[Core Function GUICreateMenuItem|GUICreate( &amp;quot;MenuItem&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt; )]] -- Create a MenuItem&lt;br /&gt;
* [[Core Function GUICreateTabSheet|GUICreate( &amp;quot;TabSheet&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabSheet&lt;br /&gt;
* [[Core Function GUICreateTabPage|GUICreate( &amp;quot;TabPage&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabPage&lt;br /&gt;
* [[Core Function GUICreateRichTextBox|GUICreate( &amp;quot;RichTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RichTextBox&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Creates a source code editor textbox the same as the one used in the Sputnik IDE&lt;br /&gt;
* [[Core Function GUICreateCheckBox|GUICreate( &amp;quot;CheckBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckBox&lt;br /&gt;
* [[Core Function GUICreateRadioButton|GUICreate( &amp;quot;RadioButton&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RadioButton&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a textbox with syntax highlight and support for multiple and custom languages (Same thing Sputnik IDE uses)&lt;br /&gt;
* [[Core Function GUICreateHotkeyBox|GUICreate( &amp;quot;HotKeyBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a hotkeybox which a user can press a hotkey into it so you can make use of it&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function GUICreateDateTimePicker|GUICreate( &amp;quot;DateTimePicker&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DateTimePicker&lt;br /&gt;
* [[Core Function GUICreateLinkLabel|GUICreate( &amp;quot;LinkLabel&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a LinkLabel&lt;br /&gt;
* [[Core Function GUICreateCheckedListBox|GUICreate( &amp;quot;CheckedListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckedListBox&lt;br /&gt;
* [[Core Function GUICreateListView|GUICreate( &amp;quot;ListView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListView&lt;br /&gt;
* [[Core Function GUICreateMaskedTextBox|GUICreate( &amp;quot;MaskedTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MaskedTextBox&lt;br /&gt;
* [[Core Function GUICreateMonthCalendar|GUICreate( &amp;quot;MonthCalendar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MonthCalendar&lt;br /&gt;
* [[Core Function GUICreateNumericUpDown|GUICreate( &amp;quot;NumericUpDown&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a NumericUpDown&lt;br /&gt;
* [[Core Function GUICreateToolTip|GUICreate( &amp;quot;ToolTip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolTip&lt;br /&gt;
* [[Core Function GUICreateTreeView|GUICreate( &amp;quot;TreeView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TreeView&lt;br /&gt;
* [[Core Function GUICreateWebBrowser|GUICreate( &amp;quot;WebBrowser&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a WebBrowser&lt;br /&gt;
* [[Core Function GUICreateStatusBar|GUICreate( &amp;quot;StatusBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a StatusBar&lt;br /&gt;
* [[Core Function GUICreateToolStrip|GUICreate( &amp;quot;ToolStrip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolStrip&lt;br /&gt;
&lt;br /&gt;
===== Window/Control Properties Get/Set Functions =====&lt;br /&gt;
&lt;br /&gt;
Note - Any options not here are most likely found using GUIGetProp and GUISetProp the bulk of all props can be found/used in them 2 funtions however anything special and not generic will go in the functions below.&lt;br /&gt;
&lt;br /&gt;
* [[Core Function GUIWindow|GUIWindow( &amp;lt;window&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Windows&lt;br /&gt;
* [[Core Function GUIRichTextBox|GUIRichTextBox( &amp;lt;richtextbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RichTextBox&lt;br /&gt;
* [[Core Function GUIDataGrid|GUIDataGrid( &amp;lt;datagrid&amp;gt; )]] -- Properties &amp;amp; Functions specifically for DataGrid&lt;br /&gt;
* [[Core Function GUITimer|GUITimer( &amp;lt;timer&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Timer&lt;br /&gt;
* [[Core Function GUICodeBox|GUIComboBox( &amp;lt;codebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CodeBox&lt;br /&gt;
* [[Core Function GUIComboBox|GUIComboBox( &amp;lt;combobox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ComboBox&lt;br /&gt;
* [[Core Function GUICheckBox|GUICheckBox( &amp;lt;checkbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CheckBox&lt;br /&gt;
* [[Core Function GUIRadioButton|GUIRadioButton( &amp;lt;radiobutton&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RadioButton&lt;br /&gt;
* [[Core Function GUIHotkeyBox|GUIHotkeyBox( &amp;lt;hotkeybox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for HotkeyBox&lt;br /&gt;
* [[Core Function GUIListBox|GUIListBox( &amp;lt;listbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ListBox&lt;br /&gt;
* [[Core Function GUITabSheet|GUITabSheet( &amp;lt;tabsheet&amp;gt; )]] -- Properties &amp;amp; Functions specifically for TabSheet&lt;br /&gt;
* [[Core Function GUIProgressBar|GUIProgressBar( &amp;lt;progressbar&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ProgressBar&lt;br /&gt;
* [[Core Function GUIPictureBox|GUIPictureBox( &amp;lt;picturebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for PictureBox&lt;br /&gt;
* [[Core Function GUIMsgFilter|GUIMsgFilter( &amp;lt;gui object&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all messages windows sends to the GUI object (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
* [[Core Function GUIWndProc|GUIWndProc( &amp;lt;gui&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all the WindProc messages windows sends to the GUI window (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
&lt;br /&gt;
===== Common Dialog/Control Properties Get/Set Functions =====&lt;br /&gt;
* [[Core Function GUIGetProp|GUIGetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt; )]] -- Get the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUISetProp|GUISetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUIGetPropList|GUIGetPropList( &amp;lt;gui object&amp;gt;, &amp;lt;searchfor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get an array of the the names and types of all compatible/incompatible/all properties that the GUI object offers&lt;br /&gt;
&lt;br /&gt;
===== GUI Link (Event) Functions =====&lt;br /&gt;
* [[Core Function GUILink|GUILink( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt;, &amp;lt;action&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Add an event (link) to a GUI object such as Click, MouseDown etc&lt;br /&gt;
* [[Core Function GUILinkValid|GUILinkValid( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt; )]] -- Check if a given event (link) is valid for the given GUI object&lt;br /&gt;
&lt;br /&gt;
===== Graphics/Pixel Functions =====&lt;br /&gt;
* [[Core Function Colour|Colour( &amp;lt;name&amp;gt; )]] -- Get the colour INT value of a given colours name&lt;br /&gt;
* [[Core Function ColourDialog|ColourDialog( )]] -- Allows the user to select a colour and allows you to get the RED, GREEN, BLUE etc values&lt;br /&gt;
* [[Core Function FontDialog|FontDialog( &amp;lt;font&amp;gt; )]] -- Allows the user to select a font and allows you to get the Name, size, bold etc values&lt;br /&gt;
&lt;br /&gt;
===== Bitmap Functions =====&lt;br /&gt;
* [[Core Function BitmapCreate|BitmapCreate( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Create a new blank bitmap object&lt;br /&gt;
* [[Core Function BitmapGetPixel|BitmapGetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Get a pixel on a bitmap object&lt;br /&gt;
* [[Core Function BitmapSetPixel|BitmapSetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;colour&amp;gt; )]] -- Alter a pixel on a bitmap object&lt;br /&gt;
&lt;br /&gt;
===== Other GUI Functions =====&lt;br /&gt;
* [[Core Function GUIStatus|GUIStatus( &amp;lt;gui window&amp;gt; )]] -- Check if a GUI window is loaded or unloaded&lt;br /&gt;
* [[Core Function GUIHideCaret|GUIHideCaret( &amp;lt;gui object&amp;gt; )]] -- Hide the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIShowCaret|GUIShowCaret( &amp;lt;gui object&amp;gt; )]] -- Show the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIRedraw|GUIRedraw( &amp;lt;gui object&amp;gt; )]] -- Redraw the object&lt;br /&gt;
* [[Core Function GUICreateFont|GUICreate( &amp;quot;Font&amp;quot;, &amp;lt;name&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Create a Font&lt;br /&gt;
* [[Core Function MsgBox|MsgBox( &amp;lt;message&amp;gt;, &amp;lt;title&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Show a message dialog&lt;br /&gt;
* [[Core Function InputBox|InputBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input text&lt;br /&gt;
* [[Core Function InputBoxEx|InputBoxEx( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input multiple lines of text&lt;br /&gt;
* [[Core Function ChoiceBox|ChoiceBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows a window with choices for the user to pick from either none/one or many choices can be allowed&lt;br /&gt;
* [[Core Function ToolTip|ToolTip( &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Creates a tooltip anywhere on the screen&lt;br /&gt;
* [[Core Function ToolTipKill|ToolTipKill( &amp;lt;ToolTip&amp;gt; )]] -- Delete a tooltip that was made using ToolTip()&lt;br /&gt;
* [[Core Function PSet|PSet( &amp;lt;gui object&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;object&amp;gt; )]] -- Draw at a pixel&lt;br /&gt;
* [[Core Function GUISendToBack|GUISendToBack( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the back of the ZOrder&lt;br /&gt;
* [[Core Function GUIBringToFront|GUIBringToFront( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the front of the ZOrder&lt;br /&gt;
&lt;br /&gt;
===== Variable Type Checking etc =====&lt;br /&gt;
* [[Core Function isVarGUIObject|isVarGUIObject( $variable )]] -- Check if a variable holds a GUI Object&lt;br /&gt;
* [[Core Function GetVarGUIObjType|GetVarGUIObjType( $variable )]] -- Get the common object type of a variable (If it is a GUI object)&lt;br /&gt;
&lt;br /&gt;
==== Keyboard Control Functions ====&lt;br /&gt;
* [[Core Function HotKeySet|HotKeySet( &amp;lt;keydef&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Create a custom hotkey to run custom code or execute a function&lt;br /&gt;
* [[Core Function SendKeys|SendKeys( &amp;lt;keydef&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends simulated keystrokes to the active window&lt;br /&gt;
* [[Core Function RealGetKeyState|RealGetKeyState( &amp;lt;vk_keycode/expression&amp;gt; )]] -- Checks if a key or series of keys is pressed down&lt;br /&gt;
* [[Core Function KeyHook|KeyHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide Keyhook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Mouse Control Functions ====&lt;br /&gt;
* [[Core Function MouseClick|MouseClick ( &amp;lt;button&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click operation&lt;br /&gt;
* [[Core Function MouseClickDrag|MouseClickDrag ( &amp;lt;button&amp;gt;, &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click and drag operation&lt;br /&gt;
* [[Core Function MouseDown|MouseDown ( &amp;lt;button&amp;gt; )]] -- Perform a mouse down event at the current mouse position&lt;br /&gt;
* [[Core Function MouseUp|MouseUp ( &amp;lt;button&amp;gt; )]] -- Perform a mouse up event at the current mouse position&lt;br /&gt;
* [[Core Function MouseMove|MouseMove ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves the mouse pointer&lt;br /&gt;
* [[Core Function MouseGetPos|MouseGetPos ( )]] -- Retrieves the current position of the mouse cursor&lt;br /&gt;
* [[Core Function MouseWheel|MouseWheel ( &amp;lt;direction&amp;gt;, &amp;lt;clicks&amp;gt; )]] -- Moves the mouse wheel up or down&lt;br /&gt;
* [[Core Function MouseHook|MouseHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide MouseHook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Window Management Functions ====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function WinActivate|WinActivate ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Activates (gives focus to) a window&lt;br /&gt;
* [[Core Function WinActive|WinActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists and is currently active&lt;br /&gt;
* [[Core Function WinExists|WinExists ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists&lt;br /&gt;
* [[Core Function WinGetClassList|WinGetClassList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the classes from a window&lt;br /&gt;
* [[Core Function WinGetHandle|WinGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the internal handle of a window&lt;br /&gt;
* [[Core Function WinGetPos|WinGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the position and size of a given window&lt;br /&gt;
* [[Core Function WinGetCaretPos|WinGetCaretPos ( )]] -- Returns the coordinates of the caret in the foreground window&lt;br /&gt;
* [[Core Function WinGetTitle|WinGetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the full title from a window&lt;br /&gt;
* [[Core Function WinGetText|WinGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the text from a window&lt;br /&gt;
* [[Core Function WinGetState|WinGetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the state of a given window&lt;br /&gt;
* [[Core Function WinGetProcess|WinGetProcess ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the Process ID (PID) associated with a window&lt;br /&gt;
* [[Core Function WinGetClientSize|WinGetClientSize ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the size of a given window's client area&lt;br /&gt;
* [[Core Function WinClose|WinClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Closes a window&lt;br /&gt;
* [[Core Function WinKill|WinKill ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Forces a window to close&lt;br /&gt;
* [[Core Function WinMove|WinMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves and/or resizes a window&lt;br /&gt;
* [[Core Function WinWait|WinWait ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window exists&lt;br /&gt;
* [[Core Function WinWaitActive|WinWaitActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is active&lt;br /&gt;
* [[Core Function WinWaitNotActive|WinWaitNotActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is not active&lt;br /&gt;
* [[Core Function WinWaitClose|WinWaitClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window does not exist&lt;br /&gt;
* [[Core Function WinSetTitle|WinSetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;newtitle&amp;gt; )]] -- Changes the title of a window&lt;br /&gt;
* [[Core Function WinSetState|WinSetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows, hides, minimizes, maximizes, or restores a window&lt;br /&gt;
* [[Core Function WinSetTrans|WinSetTrans ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;transparency&amp;gt; )]] -- Sets the transparency of a window&lt;br /&gt;
* [[Core Function WinMinimizeAll|WinMinimizeAll  ( )]] -- Minimizes all windows&lt;br /&gt;
* [[Core Function WinMinimizeAllUndo|WinMinimizeAllUndo ( )]] -- Undoes a previous WinMinimizeAll function&lt;br /&gt;
* [[Core Function WinFlash|WinFlash ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flashes&amp;gt;, &amp;lt;delay&amp;gt; )]] -- Flashes a window in the taskbar&lt;br /&gt;
* [[Core Function WinMenuSelectItem|WinMenuSelectItem( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;item&amp;gt;, &amp;lt;subitems&amp;gt; ... )]] -- Invokes a menu item of a window&lt;br /&gt;
* [[Core Function WinList|WinList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves a list of windows&lt;br /&gt;
&lt;br /&gt;
===== Controls =====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ControlClick|ControlClick ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;button&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Sends a mouse click command to a given control&lt;br /&gt;
* [[Core Function ControlSend|ControlSend ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;string&amp;gt; &amp;lt;flag&amp;gt; )]] -- Sends a string of characters to a control&lt;br /&gt;
* [[Core Function ControlGetFocus|ControlGetFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Returns the ControlRef# of the control that has keyboard focus within a specified window&lt;br /&gt;
* [[Core Function ControlGetPos|ControlGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the position and size of a control relative to it's window&lt;br /&gt;
* [[Core Function ControlDisable|ControlDisable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Disables a control&lt;br /&gt;
* [[Core Function ControlEnable|ControlEnable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Enables a control&lt;br /&gt;
* [[Core Function ControlShow|ControlShow ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Shows a control that was hidden&lt;br /&gt;
* [[Core Function ControlHide|ControlHide ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Hides a control&lt;br /&gt;
* [[Core Function ControlGetText|ControlGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves text from a control&lt;br /&gt;
* [[Core Function ControlSetText|ControlSetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;text&amp;gt; )]] -- Sets text of a control&lt;br /&gt;
* [[Core Function ControlMove|ControlMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves a control within a window&lt;br /&gt;
* [[Core Function ControlGetHandle|ControlGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the internal handle of a control&lt;br /&gt;
* [[Core Function ControlFocus|ControlFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Sets input focus to a given control on a window&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function ControlCommand|ControlCommand ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;option&amp;gt; )]] -- Sends a command to a control&lt;br /&gt;
&lt;br /&gt;
==== Graphics/Pixel Functions ====&lt;br /&gt;
* [[Core Function PixelGetColour|PixelGetColour ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Returns a pixel colour according to x, y pixel coordinates&lt;br /&gt;
* [[Core Function PixelGetMouse|PixelGetMouse ( )]] -- Returns a pixel colour according to x, y position of the mouse pointer&lt;br /&gt;
* [[Core Function PixelSearch|PixelSearch ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelSearchHWND|PixelSearchHWND ( &amp;lt;hwnd&amp;gt;, &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelChecksum|PixelChecksum ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;step&amp;gt;, &amp;lt;hwnd&amp;gt; )]] -- Generates a checksum for a region of pixels&lt;br /&gt;
* [[Core Function RGB|RGB( &amp;lt;red&amp;gt;, &amp;lt;green&amp;gt;, &amp;lt;blue&amp;gt; )]] -- Get the colour INT value of given red, green and blue bytes&lt;br /&gt;
* [[Core Function GetRValue|GetRValue( &amp;lt;colour&amp;gt; )]] -- Get the red byte from a colour INT value&lt;br /&gt;
* [[Core Function GetGValue|GetGValue( &amp;lt;colour&amp;gt; )]] -- Get the green byte from a colour INT value&lt;br /&gt;
* [[Core Function GetBValue|GetBValue( &amp;lt;colour&amp;gt; )]] -- Get the blue byte from a colour INT value&lt;br /&gt;
&lt;br /&gt;
==== Sputnik Plugins (Using .NET DLLs) ====&lt;br /&gt;
* [[Core Function Use|Use( &amp;lt;name/array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Define a .NET assemblies namespace + full qualified name for use in creating .NET objects or define a Sputnik plugin to load&lt;br /&gt;
* [[Core Function Unuse|Unuse( &amp;lt;name&amp;gt; )]] -- Remove a .NET namespace from Sputniks search group (Added by Use() function)&lt;br /&gt;
&lt;br /&gt;
==== Control Flow Functions ====&lt;br /&gt;
* [[Core Function Return|Return &amp;lt;expressions&amp;gt;]] -- Immediately ends execution of the current function, and returns its argument as the value of the function call. return will also end the execution of an Eval() statement or script file&lt;br /&gt;
* [[Core Function Throw|Throw( &amp;lt;expression&amp;gt; )]] -- Throw an exception&lt;br /&gt;
* [[Core Function Die|Die( &amp;lt;expression&amp;gt; )]] -- Gives an error and terminates the program&lt;br /&gt;
* [[Core Function Break|Break( &amp;lt;scopes&amp;gt; )]] -- Ends execution of the current loop&lt;br /&gt;
* [[Core Function Continue|Continue( &amp;lt;scopes&amp;gt; )]] -- Continue the execution of a loop at its next iteration&lt;br /&gt;
* [[Core Function Redo|Redo( )]] -- Continue the execution of a loop at the start of the current iteration&lt;br /&gt;
&lt;br /&gt;
==== Internal Class Management and Information ====&lt;br /&gt;
* [[Core Function ClassExists|ClassExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Class exists&lt;br /&gt;
* [[Core Function ClassList|ClassList( &amp;lt;expression&amp;gt;, &amp;lt;inherits&amp;gt; )]] -- Return an array of all user defined classes (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function ClassInfo|ClassInfo( &amp;lt;class-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* [[Core Function ClassStack|ClassStack( &amp;lt;variable&amp;gt; )]] -- Return a reference to a classes internal variable stack (as an array) (or set the class stack from an existing array)&lt;br /&gt;
* [[Core Function ClassName|ClassName( &amp;lt;variable&amp;gt; )]] -- Return the name of the class on a variable or a class this code is running inside of (automatically uses $this if no param is given)&lt;br /&gt;
* [[Core Function UnsetClass|UnsetClass( &amp;lt;class-name&amp;gt; )]] -- Delete a previous user defined Class from Sputnik&lt;br /&gt;
* [[Core Function New|New( &amp;lt;classConstruction&amp;gt; )]] -- Create a new instance of a given class name optionally with parameters to be sent to the __Construct function of the new class&lt;br /&gt;
* [[Core Function NewClass|newClass( &amp;lt;name&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a new instance of a class by its name as a string&lt;br /&gt;
* [[Core Function NewClassFromArray|NewClassFromArray( &amp;lt;name&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and an array of its values&lt;br /&gt;
* [[Core Function ConvertClass|ConvertClass( &amp;lt;oldClass&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and copy the values from another class&lt;br /&gt;
* [[Core Function IsOverloaded|IsOverloaded( &amp;lt;class&amp;gt;, &amp;lt;overload&amp;gt; )]] -- Check if a given cast/operator overload exists within a class&lt;br /&gt;
&lt;br /&gt;
==== Internal Function Management and Information ====&lt;br /&gt;
* [[Core Function FunctionExists|FunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Function exists&lt;br /&gt;
* [[Core Function FunctionList|FunctionList( &amp;lt;expression&amp;gt;, &amp;lt;class&amp;gt; )]] -- Return an array of all user defined functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function FunctionInfo|FunctionInfo( &amp;lt;function-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a function&lt;br /&gt;
* [[Core Function UnsetFunction|UnsetFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a previous user defined Function from Sputnik&lt;br /&gt;
* [[Core Function UnsetCoreFunction|UnsetCoreFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a core function from Sputnik&lt;br /&gt;
* [[Core Function CoreFunctionExists|CoreFunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Core Function exists&lt;br /&gt;
* [[Core Function CoreFunctionList|CoreFunctionList( &amp;lt;expression&amp;gt; )]] -- Return an array of all core functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function Eval|Eval( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;cleanup&amp;gt;, &amp;lt;printToReturn&amp;gt; )]] -- Evaluate a string as Sputnik code&lt;br /&gt;
* [[Core Function MKFunc|MKFunc(&amp;lt;params&amp;gt;, &amp;lt;body&amp;gt;)]] -- Create a user defined function to be called from a variable&lt;br /&gt;
* [[Core Function CallFunc|CallFunc( &amp;lt;function&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a user defined function contained in a variable&lt;br /&gt;
* [[Core Function Call|Call(&amp;lt;function/array&amp;gt;, &amp;lt;expressions&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
* [[Core Function CallArray|CallArray( &amp;lt;function/array&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
&lt;br /&gt;
==== Internal Enum Management and Information ====&lt;br /&gt;
* [[Core Function EnumExists|EnumExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Enum exists&lt;br /&gt;
* [[Core Function EnumList|EnumList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined enums (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetEnum|UnsetEnum( &amp;lt;enum-name&amp;gt; )]] -- Delete a previous user defined Enum from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLImport Management and Information ====&lt;br /&gt;
* [[Core Function DLLImportExists|DLLImportExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLImport exists&lt;br /&gt;
* [[Core Function DLLImportList|DLLImportList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllimports (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLImport|UnsetDLLImport( &amp;lt;dllimport-function-name&amp;gt; )]] -- Delete a function imported using the DLLImport() function&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLStruct Management and Information ====&lt;br /&gt;
* [[Core Function DLLStructExists|DLLStructExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLStruct exists&lt;br /&gt;
* [[Core Function DLLStructList|DLLStructList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllstructs (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLStruct|UnsetDLLStruct( &amp;lt;dllstruct-name&amp;gt; )]] -- Delete a previous user defined DLLStruct from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal Variable/Scope Information ====&lt;br /&gt;
* [[Core Function VarList|VarList( &amp;lt;varScope/class&amp;gt; )]] -- Obtain information on all variables that exist in a given scope or class&lt;br /&gt;
* [[Core Function VarTypeToString|VarTypeToString( &amp;lt;varType&amp;gt; )]] -- Convert a raw variable type into it's string representation&lt;br /&gt;
* [[Core Function VarTypeFromString|VarTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarObjTypeToString|VarObjTypeToString( &amp;lt;varObjType&amp;gt; )]] -- Convert a raw variable object type into it's string representation&lt;br /&gt;
* [[Core Function VarObjTypeFromString|VarObjTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable object type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarScopeToString|VarScopeToString( &amp;lt;varScope&amp;gt; )]] -- Convert a raw variable scope into it's string representation&lt;br /&gt;
* [[Core Function VarScopeFromString|VarScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable scope from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function ScopeToString|ScopeToString( &amp;lt;scope&amp;gt; )]] -- Convert a raw scope into it's string representation&lt;br /&gt;
* [[Core Function ScopeFromString|ScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a scope from it's string representation into it's raw type&lt;br /&gt;
&lt;br /&gt;
==== Eval Functions ====&lt;br /&gt;
* [[Core Function EvalSyntax|EvalSyntax( &amp;lt;expression&amp;gt; )]] -- Evaluate a string as Sputnik code but only check if it's syntax is valid&lt;br /&gt;
* [[Core Function EvalCreate|EvalCreate( )]] -- Create an Eval object for use with Eval()&lt;br /&gt;
* [[Core Function EvalSet|EvalSet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a variable inside an Eval Object&lt;br /&gt;
* [[Core Function EvalGet|EvalGet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get a from variable inside an Eval Object&lt;br /&gt;
&lt;br /&gt;
==== Misc Functions ====&lt;br /&gt;
* [[Core Function Exit|Exit( &amp;lt;exitCode&amp;gt; )]] -- Instantly terminate the program/script&lt;br /&gt;
* [[Core Function Assert|Assert( &amp;lt;toCheck&amp;gt;, &amp;lt;errorMsg&amp;gt; )]] -- Check if value is true (if so returns it) if it is not then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* [[Core Function Warn|Warn( &amp;lt;message&amp;gt; )]] -- Show a warning message with source file name and line number&lt;br /&gt;
* [[Core Function Clone|Clone( &amp;lt;object&amp;gt; )]] -- Create a clone of a clone-able object&lt;br /&gt;
* [[Core Function LineInfo|LineInfo( )]] -- Get a vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* [[Core Function GC|GC( &amp;lt;flag&amp;gt; )]] -- Use the garbage collector&lt;br /&gt;
* [[Core Function HWND|HWND( )]] -- Get the HWND of the hidden window used by this program (It handles hotkeys etc)&lt;br /&gt;
* [[Core Function Require|Require( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use&lt;br /&gt;
* [[Core Function Include|Include( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use and execute all expressions&lt;br /&gt;
* [[Core Function Opt|Opt( &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt; )]] -- Changes the operation of various Sputnik functions/parameters&lt;br /&gt;
* [[Core Function IsAdmin|IsAdmin( )]] -- Check if the script is running in admin mode or not (Run as administrator)&lt;br /&gt;
* [[Core Function ObjToVar|ObjToVar( &amp;lt;variable&amp;gt; )]] -- Convert a $variable's object to its compatible $variable data type&lt;br /&gt;
* [[Core Function VarToObj|VarToObj( &amp;lt;variable&amp;gt; )]] -- Convert a $variable to its compatible object (such as .NET base object)&lt;br /&gt;
&lt;br /&gt;
=== User Defined Functions ===&lt;br /&gt;
&lt;br /&gt;
These functions are created using Sputnik and are not part of the Sputnik core language.&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_JsonEncode</id>
		<title>Core Function JsonEncode</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_JsonEncode"/>
				<updated>2015-09-21T18:34:40Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Json Serializable Classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
JsonEncode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Returns the JSON representation of a value.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The input string. &lt;br /&gt;
&lt;br /&gt;
==== options ====&lt;br /&gt;
&lt;br /&gt;
Optional; Bitmask consisting of any/all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@JSON_HEX_TAG            // All &amp;amp;lt; and &amp;amp;gt; are converted to \u003C and \u003E&lt;br /&gt;
@JSON_HEX_AMP            // All &amp;amp;amp;s are converted to \u0026&lt;br /&gt;
@JSON_HEX_APOS           // All ' are converted to \u0027&lt;br /&gt;
@JSON_HEX_QUOT           // All &amp;quot; are converted to \u0022&lt;br /&gt;
@JSON_FORCE_OBJECT       // Outputs an object rather than an array&lt;br /&gt;
                         // when a non-associative array is used&lt;br /&gt;
                         // Especially useful when the recipient of the&lt;br /&gt;
                         // output is expecting an object and the array is empty&lt;br /&gt;
@JSON_NUMERIC_CHECK      // Encodes numeric strings as numbers&lt;br /&gt;
@JSON_BASE64_BINARY      // Encodes Binary in Base64&lt;br /&gt;
@JSON_CONSTRUCTOR_CLASS  // Encodes Classes in a Constructor so they will be decoded fully&lt;br /&gt;
                         // Note - This is ignored if you are using the JsonSerializable extend&lt;br /&gt;
@JSON_PRETTY_PRINT       // Use whitespace in returned data to format it so it is easy to read&lt;br /&gt;
@JSON_UNESCAPED_SLASHES  // Don't escape /&lt;br /&gt;
@JSON_UNESCAPED_UNICODE  // Encode multibyte Unicode characters literally (default is to escape as \uXXXX)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Default: 0 (All options False)&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns a JSON encoded string on success or FALSE on failure.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns empty string.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
If you are decoding a JSON that contains a class with a constructor name 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;
Using @JSON_PRETTY_PRINT to make JSON easy to read&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create something to encode&lt;br /&gt;
my $Testy = Pack(&amp;quot;iz0&amp;quot;, 1337, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
my $Hehe = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $Testy, array(&amp;quot;Cat&amp;quot; =&amp;gt; array(&amp;quot;Four&amp;quot;, &amp;quot;Five&amp;quot;), &amp;quot;Dog&amp;quot;), &amp;quot;FoX&amp;quot;);&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Hehe, @JSON_PRETTY_PRINT);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
// Encoded:&lt;br /&gt;
// [&lt;br /&gt;
//   &amp;quot;One&amp;quot;,&lt;br /&gt;
//   &amp;quot;Two&amp;quot;,&lt;br /&gt;
//   &amp;quot;9\u0005\u0000\u0000Hi&amp;quot;,&lt;br /&gt;
//   {&lt;br /&gt;
//     &amp;quot;0&amp;quot;: &amp;quot;Dog&amp;quot;,&lt;br /&gt;
//     &amp;quot;Cat&amp;quot;: [&lt;br /&gt;
//       &amp;quot;Four&amp;quot;,&lt;br /&gt;
//       &amp;quot;Five&amp;quot;&lt;br /&gt;
//     ]&lt;br /&gt;
//   },&lt;br /&gt;
//   &amp;quot;FoX&amp;quot;&lt;br /&gt;
// ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode binary (Default method)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a binary to encode&lt;br /&gt;
my $Testy = Pack(&amp;quot;iz0&amp;quot;, 1337, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Testy);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Decode the output into binary by casting it&lt;br /&gt;
my $Bin = (binary)$Decoded;&lt;br /&gt;
// Print the Decoded binary&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr (binary)$Bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// &amp;quot;9\u0005\u0000\u0000Hi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// {BINARY:6}&lt;br /&gt;
// {&lt;br /&gt;
//         [0] =&amp;gt; 57&lt;br /&gt;
//         [1] =&amp;gt; 5&lt;br /&gt;
//         [2] =&amp;gt; 0&lt;br /&gt;
//         [3] =&amp;gt; 0&lt;br /&gt;
//         [4] =&amp;gt; 72&lt;br /&gt;
//         [5] =&amp;gt; 105&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode binary (Safest method)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a binary to encode&lt;br /&gt;
my $Binary = Pack(&amp;quot;iz0&amp;quot;, 1337, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
// Hex encode the binary&lt;br /&gt;
my $Encoded = BinaryStr($Binary, '');&lt;br /&gt;
// Make an array to store some stuff&lt;br /&gt;
my $Arr = array(&amp;quot;Hello&amp;quot;, $Encoded, 100);&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Arr);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Decode the binary in the array&lt;br /&gt;
$Decoded[1] = BinaryHex($Decoded[1]);&lt;br /&gt;
// Print the Decoded binary&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// [&amp;quot;Hello&amp;quot;,&amp;quot;390500004869&amp;quot;,100]&lt;br /&gt;
// &lt;br /&gt;
// Decoded:&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; Hello&lt;br /&gt;
//     [1] =&amp;gt; Binary&lt;br /&gt;
//         (&lt;br /&gt;
//             [0] =&amp;gt; 57&lt;br /&gt;
//             [1] =&amp;gt; 5&lt;br /&gt;
//             [2] =&amp;gt; 0&lt;br /&gt;
//             [3] =&amp;gt; 0&lt;br /&gt;
//             [4] =&amp;gt; 72&lt;br /&gt;
//             [5] =&amp;gt; 105&lt;br /&gt;
//         )&lt;br /&gt;
//     [2] =&amp;gt; 100&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode binary (Base64 method: @JSON_BASE64_BINARY)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a binary to encode&lt;br /&gt;
my $Testy = Pack(&amp;quot;iz0&amp;quot;, 1337, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Testy, @JSON_BASE64_BINARY);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Decode the output into binary by casting it&lt;br /&gt;
my $Bin = (binary)$Decoded;&lt;br /&gt;
// Print the Decoded binary&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr (binary)Decode64($Bin);&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// &amp;quot;OQUAAEhp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// {BINARY:6}&lt;br /&gt;
// {&lt;br /&gt;
//         [0] =&amp;gt; 57&lt;br /&gt;
//         [1] =&amp;gt; 5&lt;br /&gt;
//         [2] =&amp;gt; 0&lt;br /&gt;
//         [3] =&amp;gt; 0&lt;br /&gt;
//         [4] =&amp;gt; 72&lt;br /&gt;
//         [5] =&amp;gt; 105&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode an array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create an array to Json encode&lt;br /&gt;
my $Testy = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;, &amp;quot;Fox&amp;quot;, 100, 200, 300);&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Testy);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded object&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// [&amp;quot;Cat&amp;quot;,&amp;quot;Dog&amp;quot;,&amp;quot;Fox&amp;quot;,100,200,300]&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// ARRAY&lt;br /&gt;
// {&lt;br /&gt;
//         [0] =&amp;gt; Cat&lt;br /&gt;
//         [1] =&amp;gt; Dog&lt;br /&gt;
//         [2] =&amp;gt; Fox&lt;br /&gt;
//         [3] =&amp;gt; 100&lt;br /&gt;
//         [4] =&amp;gt; 200&lt;br /&gt;
//         [5] =&amp;gt; 300&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode an associative array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create an array to Json encode&lt;br /&gt;
my $Testy = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;, &amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;);&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Testy);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded object&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// {&amp;quot;Cat&amp;quot;:&amp;quot;Meow&amp;quot;,&amp;quot;Dog&amp;quot;:&amp;quot;Woof&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// ARRAY&lt;br /&gt;
// {&lt;br /&gt;
//        [Cat] =&amp;gt; Meow&lt;br /&gt;
//        [Dog] =&amp;gt; Woof&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode a simple string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create the string to Json encode&lt;br /&gt;
my $Testy = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;, &amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;);&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode(&amp;quot;Hello&amp;quot;);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded object&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// &amp;quot;Hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode a class (using @JSON_CONSTRUCTOR_CLASS)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// The @JSON_CONSTRUCTOR_CLASS helps to recreate&lt;br /&gt;
// classes properly&lt;br /&gt;
&lt;br /&gt;
// Create a base class&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
// Create an array to Json encode&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Add some variables to the class&lt;br /&gt;
$Testy-&amp;gt;$Cat = &amp;quot;Meow&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;$Dog = &amp;quot;Woof&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;$Position = 1337;&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Testy, @JSON_CONSTRUCTOR_CLASS);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded object&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// new testy({&amp;quot;cat&amp;quot;:&amp;quot;Meow&amp;quot;,&amp;quot;dog&amp;quot;:&amp;quot;Woof&amp;quot;,&amp;quot;position&amp;quot;:1337})&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// {CLASS:testy;ID:5}&lt;br /&gt;
// {&lt;br /&gt;
//         [cat] =&amp;gt; Meow&lt;br /&gt;
//         [dog] =&amp;gt; Woof&lt;br /&gt;
//         [position] =&amp;gt; 1337&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode a class (without using @JSON_CONSTRUCTOR_CLASS)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a base class&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
// Create an array to Json encode&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Add some variables to the class&lt;br /&gt;
$Testy-&amp;gt;$Cat = &amp;quot;Meow&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;$Dog = &amp;quot;Woof&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;$Position = 1337;&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Testy);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded, @JSON_OBJECT_AS_ARRAY);&lt;br /&gt;
// Print the Decoded object&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
// JSON returned an array so lets convert it&lt;br /&gt;
// into a class now&lt;br /&gt;
my $cls = NewClassFromArray(&amp;quot;Testy&amp;quot;, $Decoded);&lt;br /&gt;
printr $cls;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// {&amp;quot;cat&amp;quot;:&amp;quot;Meow&amp;quot;,&amp;quot;dog&amp;quot;:&amp;quot;Woof&amp;quot;,&amp;quot;position&amp;quot;:1337}&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// {CLASS:testy;ID:5}&lt;br /&gt;
// {&lt;br /&gt;
//         [cat] =&amp;gt; Meow&lt;br /&gt;
//         [dog] =&amp;gt; Woof&lt;br /&gt;
//         [position] =&amp;gt; 1337&lt;br /&gt;
//         [this] =&amp;gt;       {CLASS:testy;ID:5}&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encode and Decode a class (without using @JSON_CONSTRUCTOR_CLASS)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create a base class&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
// Create an array to Json encode&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Add some variables to the class&lt;br /&gt;
$Testy-&amp;gt;$Cat = &amp;quot;Meow&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;$Dog = &amp;quot;Woof&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;$Position = 1337;&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($Testy);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
// Decode the JSON&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded object&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
// JSON returned an StdClass so lets convert it&lt;br /&gt;
// into a 'Testy' class now&lt;br /&gt;
my $cls = ConvertClass($Decoded, 'Testy');&lt;br /&gt;
// The conversion process returned a copy&lt;br /&gt;
// so lets dispose of the old StdClass one&lt;br /&gt;
unset($Decoded);&lt;br /&gt;
// Finally print the result&lt;br /&gt;
printr $cls;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// {&amp;quot;cat&amp;quot;:&amp;quot;Meow&amp;quot;,&amp;quot;dog&amp;quot;:&amp;quot;Woof&amp;quot;,&amp;quot;position&amp;quot;:1337}&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// {CLASS:testy;ID:5}&lt;br /&gt;
// {&lt;br /&gt;
//         [cat] =&amp;gt; Meow&lt;br /&gt;
//         [dog] =&amp;gt; Woof&lt;br /&gt;
//         [position] =&amp;gt; 1337&lt;br /&gt;
//         [this] =&amp;gt;       {CLASS:testy;ID:5}&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Should Json Serializable ====&lt;br /&gt;
&lt;br /&gt;
Class that add functions with the name ShouldJsonSerialize* (* = Variable name) can customize if JSON should enable that value or not with JsonEncode().&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class that uses ShouldJsonSerialize&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Length;&lt;br /&gt;
	my $Position;&lt;br /&gt;
	// Create a function that decides if the&lt;br /&gt;
	// $Length variable should be JSON encoded or not&lt;br /&gt;
	// The function must start with:&lt;br /&gt;
	// ShouldJsonSerialize&lt;br /&gt;
	// and end with a variable name&lt;br /&gt;
	Function ShouldJsonSerializeLength()&lt;br /&gt;
	{&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
// Build new instance of the class&lt;br /&gt;
my $cls = new Testy();&lt;br /&gt;
$cls-&amp;gt;$Length = 7;&lt;br /&gt;
$cls-&amp;gt;$Position = 1;&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($cls, @JSON_PRETTY_PRINT);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// {&lt;br /&gt;
//   &amp;quot;position&amp;quot;: 1&lt;br /&gt;
// }&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// ARRAY&lt;br /&gt;
// {&lt;br /&gt;
//         [position] =&amp;gt; 1&lt;br /&gt;
// }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Json Serializable Classes ====&lt;br /&gt;
&lt;br /&gt;
Classes using JsonSerializable can customize their JSON representation when encoded with JsonEncode().&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
A class that returns a number&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class that uses JsonSerializable&lt;br /&gt;
Class Testy extends JsonSerializable&lt;br /&gt;
{&lt;br /&gt;
	my $value;&lt;br /&gt;
	Function __Construct($in)&lt;br /&gt;
	{&lt;br /&gt;
		$value = $in;&lt;br /&gt;
	}&lt;br /&gt;
	override Function JsonSerialize()&lt;br /&gt;
	{&lt;br /&gt;
		return $value;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode(new Testy(7), @JSON_PRETTY_PRINT);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// 7&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// 7&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A class that returns an array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class that uses JsonSerializable&lt;br /&gt;
Class Testy extends JsonSerializable&lt;br /&gt;
{&lt;br /&gt;
	my $value;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$value = array();&lt;br /&gt;
	}&lt;br /&gt;
	override Function JsonSerialize()&lt;br /&gt;
	{&lt;br /&gt;
		return $value;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
// Build new instance of the class&lt;br /&gt;
my $cls = new Testy(7);&lt;br /&gt;
// Add stuff to the class&lt;br /&gt;
$cls-&amp;gt;$value[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
$cls-&amp;gt;$value[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
$cls-&amp;gt;$value[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
// JSON Encode it&lt;br /&gt;
my $Encoded = JsonEncode($cls, @JSON_PRETTY_PRINT);&lt;br /&gt;
// Print the Encoded Text&lt;br /&gt;
say &amp;quot;Encoded:&amp;quot;;&lt;br /&gt;
say $Encoded;&lt;br /&gt;
say;&lt;br /&gt;
my $Decoded = JsonDecode($Encoded);&lt;br /&gt;
// Print the Decoded&lt;br /&gt;
say &amp;quot;Decoded:&amp;quot;;&lt;br /&gt;
printr $Decoded;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Encoded:&lt;br /&gt;
// [&lt;br /&gt;
//   &amp;quot;One&amp;quot;,&lt;br /&gt;
//   &amp;quot;Two&amp;quot;,&lt;br /&gt;
//   &amp;quot;Three&amp;quot;&lt;br /&gt;
// ]&lt;br /&gt;
&lt;br /&gt;
// Decoded:&lt;br /&gt;
// ARRAY&lt;br /&gt;
// {&lt;br /&gt;
//         [0] =&amp;gt; One&lt;br /&gt;
//         [1] =&amp;gt; Two&lt;br /&gt;
//         [2] =&amp;gt; Three&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://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-21T18:05:21Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Multiple Inheritance Classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
To implement it you must use the override keyword as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	my $_id;&lt;br /&gt;
	override my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$_id;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not define a GET or SET accessor or else you will get an error.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Functions ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as functions above but this time it will be marked as abstract so any class inheriting our class must implement a function by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
To implement it you must use the override keyword as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class we will inherit&lt;br /&gt;
Class EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// define an abstract function&lt;br /&gt;
	abstract Function Engine() { }&lt;br /&gt;
	// define two abstract properties&lt;br /&gt;
	Abstract my $GearVer { }&lt;br /&gt;
	Abstract my $GearBox { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define the final class&lt;br /&gt;
Class Car extends EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// override the abstract function Engine()&lt;br /&gt;
	override Function Engine()&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;V8&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	// streamlined property&lt;br /&gt;
	override my $GearVer { get { return &amp;quot;1.0&amp;quot;; } }&lt;br /&gt;
	// expanded property&lt;br /&gt;
	override my $GearBox&lt;br /&gt;
	{&lt;br /&gt;
		get &lt;br /&gt;
		{&lt;br /&gt;
			return &amp;quot;12Gears&amp;quot;; &lt;br /&gt;
		} &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $c = new Car();&lt;br /&gt;
say &amp;quot;Engine: &amp;quot; . $c-&amp;gt;Engine();&lt;br /&gt;
say &amp;quot;GearVer: &amp;quot; . $c-&amp;gt;$GearVer;&lt;br /&gt;
say &amp;quot;GearBox: &amp;quot; . $c-&amp;gt;$GearBox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Engine: V8&lt;br /&gt;
// GearVer: 1.0&lt;br /&gt;
// GearBox: 12Gears&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not define any statements in the { } block of the abstract function or else you will get an error.&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik supports multiple inheritance in a rather unique and powerful way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class we will inherit&lt;br /&gt;
Class EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// define an abstract function&lt;br /&gt;
	abstract Function Engine() { }&lt;br /&gt;
	// define two abstract properties&lt;br /&gt;
	Abstract my $GearVer { }&lt;br /&gt;
	Abstract my $GearBox { }&lt;br /&gt;
	// define a normal Function&lt;br /&gt;
	// the final class will inherit this&lt;br /&gt;
	// and since it is not an abstract it will&lt;br /&gt;
	// appear as if it was literally inside the&lt;br /&gt;
	// original&lt;br /&gt;
	Function EngineTest()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testing engine...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define another class we will inherit&lt;br /&gt;
Class CarColour&lt;br /&gt;
{&lt;br /&gt;
	// define an abstract property&lt;br /&gt;
	Abstract my $Colour { }&lt;br /&gt;
	// define a normal Function&lt;br /&gt;
	// the final class will inherit this&lt;br /&gt;
	// and since it is not an abstract it will&lt;br /&gt;
	// appear as if it was literally inside the&lt;br /&gt;
	// original&lt;br /&gt;
	Function ColourTest()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testing colours...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define the final class&lt;br /&gt;
// We will multiple inherit both &lt;br /&gt;
// EngineInfo AND CarColour&lt;br /&gt;
Class Car extends EngineInfo, CarColour&lt;br /&gt;
{&lt;br /&gt;
	// override the abstract function Engine()&lt;br /&gt;
	override Function Engine()&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;V8&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	// streamlined properties&lt;br /&gt;
	override my $GearVer { get { return &amp;quot;1.0&amp;quot;; } }&lt;br /&gt;
	override my $Colour { get { return &amp;quot;Red&amp;quot;; } }&lt;br /&gt;
	// expanded property&lt;br /&gt;
	override my $GearBox&lt;br /&gt;
	{&lt;br /&gt;
		get &lt;br /&gt;
		{&lt;br /&gt;
			return &amp;quot;12Gears&amp;quot;; &lt;br /&gt;
		} &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $c = new Car();&lt;br /&gt;
say &amp;quot;Colour: &amp;quot; . $c-&amp;gt;$Colour;&lt;br /&gt;
say &amp;quot;Engine: &amp;quot; . $c-&amp;gt;Engine();&lt;br /&gt;
say &amp;quot;GearVer: &amp;quot; . $c-&amp;gt;$GearVer;&lt;br /&gt;
say &amp;quot;GearBox: &amp;quot; . $c-&amp;gt;$GearBox;&lt;br /&gt;
$c-&amp;gt;EngineTest();&lt;br /&gt;
$c-&amp;gt;ColourTest();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Colour: Red&lt;br /&gt;
// Engine: V8&lt;br /&gt;
// GearVer: 1.0&lt;br /&gt;
// GearBox: 12Gears&lt;br /&gt;
// Testing engine...&lt;br /&gt;
// Testing colours...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-21T18:01:25Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Abstract/Override Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
To implement it you must use the override keyword as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	my $_id;&lt;br /&gt;
	override my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$_id;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not define a GET or SET accessor or else you will get an error.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Functions ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as functions above but this time it will be marked as abstract so any class inheriting our class must implement a function by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
To implement it you must use the override keyword as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a class we will inherit&lt;br /&gt;
Class EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// define an abstract function&lt;br /&gt;
	abstract Function Engine() { }&lt;br /&gt;
	// define two abstract properties&lt;br /&gt;
	Abstract my $GearVer { }&lt;br /&gt;
	Abstract my $GearBox { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Define the final class&lt;br /&gt;
Class Car extends EngineInfo&lt;br /&gt;
{&lt;br /&gt;
	// override the abstract function Engine()&lt;br /&gt;
	override Function Engine()&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;V8&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	// streamlined property&lt;br /&gt;
	override my $GearVer { get { return &amp;quot;1.0&amp;quot;; } }&lt;br /&gt;
	// expanded property&lt;br /&gt;
	override my $GearBox&lt;br /&gt;
	{&lt;br /&gt;
		get &lt;br /&gt;
		{&lt;br /&gt;
			return &amp;quot;12Gears&amp;quot;; &lt;br /&gt;
		} &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $c = new Car();&lt;br /&gt;
say &amp;quot;Engine: &amp;quot; . $c-&amp;gt;Engine();&lt;br /&gt;
say &amp;quot;GearVer: &amp;quot; . $c-&amp;gt;$GearVer;&lt;br /&gt;
say &amp;quot;GearBox: &amp;quot; . $c-&amp;gt;$GearBox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// Engine: V8&lt;br /&gt;
// GearVer: 1.0&lt;br /&gt;
// GearBox: 12Gears&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not define any statements in the { } block of the abstract function or else you will get an error.&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik supports multiple inheritance in a rather unique and powerful way.&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-21T17:55:26Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Abstract Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
To implement it you must use the override keyword as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	my $_id;&lt;br /&gt;
	override my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$_id;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not define a GET or SET accessor or else you will get an error.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik supports multiple inheritance in a rather unique and powerful way.&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-21T17:37:55Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Static Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	override my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$ID;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
# UniqueID: 5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not need to define a GET or SET accessor.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Abstract/Override Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik supports multiple inheritance in a rather unique and powerful way.&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-21T17:37:26Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Multiple Inheritance Classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	override my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$ID;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
# UniqueID: 5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not need to define a GET or SET accessor.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik supports multiple inheritance in a rather unique and powerful way.&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-21T17:36:25Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Abstract Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	override my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$ID;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
# UniqueID: 5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not need to define a GET or SET accessor.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_Atof</id>
		<title>Core Function Atof</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_Atof"/>
				<updated>2015-09-21T14:34:16Z</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;
Atof( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Convert string to Double.&lt;br /&gt;
&lt;br /&gt;
Parses the string, interpreting its content as a floating point number and returns its value as a double.&lt;br /&gt;
&lt;br /&gt;
The function first discards as many whitespace characters (as in isspace) as necessary until the first non-whitespace character is found.&lt;br /&gt;
&lt;br /&gt;
Then, starting from this character, takes as many characters as possible that are valid following a syntax resembling that of floating point literals (see below), and interprets them as a numerical value.&lt;br /&gt;
&lt;br /&gt;
The rest of the string after the last valid character is ignored and has no effect on the behavior of this function.&lt;br /&gt;
&lt;br /&gt;
If the first sequence of non-whitespace characters in string does not form a valid floating-point number as just defined, or if no such sequence exists because either string is empty or contains only whitespace characters, no conversion is performed and the function returns 0.0.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== variable ====&lt;br /&gt;
&lt;br /&gt;
A string beginning with the representation of a floating-point number.&lt;br /&gt;
&lt;br /&gt;
(It does not need to fully be a floating-point number just begin with one)&lt;br /&gt;
&lt;br /&gt;
==== count ====&lt;br /&gt;
&lt;br /&gt;
Optional; If you supply a variable for this parameter it will be given the number of characters that the floating-point number is made up from out of the string.&lt;br /&gt;
&lt;br /&gt;
See example.&lt;br /&gt;
&lt;br /&gt;
==== start ====&lt;br /&gt;
&lt;br /&gt;
Optional; Start position to begin searching the haystack from.&lt;br /&gt;
&lt;br /&gt;
Can be negative this will cause it to start from haystack length - abs(start) instead.&lt;br /&gt;
&lt;br /&gt;
Default: 0&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
On success, the function returns the converted floating point number as a double value.&lt;br /&gt;
&lt;br /&gt;
If no valid conversion could be performed, the function returns zero (0.0).&lt;br /&gt;
&lt;br /&gt;
If the converted value would be out of the range of representable values by a double, it will set to the @Double_Max, @Double_Min or 0.0 depending on the issue at hand.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This is useful for when you wish to exact a number from a string even if the entire string is not suitable as a number and would normally return 0.&lt;br /&gt;
&lt;br /&gt;
Using this you can extract the number you desire advance along the string using the count and continue.&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;
$var = atof( &amp;quot;77.42Hello&amp;quot; );&lt;br /&gt;
say $var; // Prints: 77.42&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of getting how many characters were extracted from the string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = atof( &amp;quot;77.42Hello&amp;quot;, $count );&lt;br /&gt;
say $var; // Prints: 77.42&lt;br /&gt;
say $count; // Prints: 5 // Since there were 5 chars in the floating-point&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using start parameter&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Search begins at index 6 of the string so it is able to find a valid floating-point&lt;br /&gt;
$var = atof( &amp;quot;Hello 777.42 hmmm&amp;quot;, null, 6 );&lt;br /&gt;
say $var; // Prints: 77.42&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using negative start parameter&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Search begins at index -3 (-3 turns out to be haystack length - abs(-3) of the string&lt;br /&gt;
// so it is able to find a valid floating-point&lt;br /&gt;
$var = atof( &amp;quot;Hello 777.42 h789&amp;quot;, null, -3 );&lt;br /&gt;
say $var; // Prints: 789&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://ubersoft.org/Sputnik/wiki/index.php/Core_Function_DLLImport_as_Array</id>
		<title>Core Function DLLImport as Array</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Core_Function_DLLImport_as_Array"/>
				<updated>2015-09-21T12:09:52Z</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;
DLLImport( &amp;lt;array&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
See [[Core Function DLLImport|DLLImport( &amp;lt;varies...&amp;gt; )]] for description&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== array ====&lt;br /&gt;
&lt;br /&gt;
The array must appear as so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
array(&lt;br /&gt;
	'MyDLL.dll&amp;quot; // This part is optional&lt;br /&gt;
	array('user32.dll', 'MessageBox', 'Int32', 'ippi', 'Ansi'),&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# First there is the array itself.&lt;br /&gt;
&lt;br /&gt;
# Second there is the optional &amp;quot;MyDLL.dll&amp;quot; to define a DLL to save the import as.&lt;br /&gt;
&lt;br /&gt;
You can tell it to save the source code by adding : and a file name to the DLL example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;MyDLL.dll:Source.cs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The source is in C#&lt;br /&gt;
&lt;br /&gt;
This parameter is optional so if you don't include the DLL name the DLLImport will just directly import these functions into your program instantly.&lt;br /&gt;
&lt;br /&gt;
If you do include the DLL name then the functions will NOT be imported into your program instantly instead it will create a DLL file for you to use and you must import that file like so:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
DLLImport(&amp;quot;MyDLL.dll&amp;quot;); // You can import this DLL after you have compiled it&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of compiling a DLL and importing that directly it saves having to recompile everything every time you call the function (Using the DLL is 10000x faster than regenerating all the calling code every time).&lt;br /&gt;
&lt;br /&gt;
When you choose to import a DLL you created you can choose to only include it ONCE using the : for example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
DLLImport(&amp;quot;MyDLL.dll:once&amp;quot;);&lt;br /&gt;
// Now this DLL can only be include ONCE in your program&lt;br /&gt;
// and any attempts to include it again will be rejected&lt;br /&gt;
// since it is already included and working&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add additional strings to do special tasks when creating a DLL or just importing functions for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DLLImport(&lt;br /&gt;
array(&lt;br /&gt;
	'MyDLL.dll&amp;quot;&lt;br /&gt;
	'@AddBefore:c_&amp;quot; // causes c_ to get added before the Function names after creation&lt;br /&gt;
	array('user32.dll', 'MessageBox', 'Int32', 'ippi', 'Ansi'),&lt;br /&gt;
	// Normally the &amp;quot;MessageBox&amp;quot; imported would be called like so:&lt;br /&gt;
	MessageBox(0, &amp;quot;Test&amp;quot;, &amp;quot;Test&amp;quot;, 0); // HOWEVER since we added @AddBefore the name has changed to:&lt;br /&gt;
	c_MessageBox(0, &amp;quot;Test&amp;quot;, &amp;quot;Test&amp;quot;, 0); // We can use this to add stuff like wapi_ etc etc.&lt;br /&gt;
)&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'@AddBefore:c_&amp;quot; is a good way to modify the name of the imported files you can also use '@AddAfter:c_&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Third you define additional arrays PER function you wish to import for example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
array('user32.dll', 'MessageBox', 'Int32', 'ippi', 'Ansi')&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example the DLL name is 'user32.dll' its importing the function 'MessageBox' the return value is expected to be an 'Int32' and the parameters are 'ippi' meaning Int32, String, String, Int32 finally the strings are going to passed the functiyon as 'Ansi' (you could of course use 'Unicode' etc)&lt;br /&gt;
&lt;br /&gt;
You can import many functions at once&lt;br /&gt;
&lt;br /&gt;
For detailed information on the parameter options you can use to create this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
array('user32.dll', 'MessageBox', 'Int32', 'ippi', 'Ansi')&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click [[Core Function DLLImport as Params|HERE]]&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
See [[Core Function DLLImport|DLLImport( &amp;lt;varies...&amp;gt; )]] for return value&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;
Example of a DLL creation&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
DllImport(&lt;br /&gt;
			array&lt;br /&gt;
			(&lt;br /&gt;
				'@AddBefore:w_', // Makes the APIs start with w_ so MessageBox = w_MessageBox&lt;br /&gt;
				'API.dll:API_DLL_Source.cs', // Tells it to produce a DLL and the Source code to it&lt;br /&gt;
				//'API.dll', // Tells it to produce only the dll&lt;br /&gt;
				// User32.dll&lt;br /&gt;
				array('User32.dll', 'MessageBox', 'Int32', 'ippi', 'Unicode'),&lt;br /&gt;
				array('User32.dll', 'GetMessageExtraInfo', 'Int32', '', ''),&lt;br /&gt;
				array('User32.dll', 'MapVirtualKey', 'UInt32', 'II', ''),&lt;br /&gt;
				array('User32.dll', 'keybd_event', '', 'bbIi', ''),&lt;br /&gt;
				array('User32.dll', 'VkKeyScan', 'Int16', 's', ''),&lt;br /&gt;
				array('User32.dll', 'SendInput', 'UInt32', 'Iti', ''),&lt;br /&gt;
				array('User32.dll', 'GetAsyncKeyState', 'Int16', 'I', ''),&lt;br /&gt;
				array('User32.dll', 'GetKeyState', 'Int16', 'I', ''),&lt;br /&gt;
				// Kernel32.dll&lt;br /&gt;
				array('Kernel32.dll', 'GetTickCount', 'Int32', '', ''),&lt;br /&gt;
				array('Kernel32.dll', 'GetTickCount64', 'Int64', '', '')&lt;br /&gt;
			)&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using the DLL (made in previous example)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
DLLImport('API.dll');&lt;br /&gt;
// Setup a few variables&lt;br /&gt;
$MB_YESNO = 0x04;&lt;br /&gt;
$MB_ICONINFORMATION = 0x40;&lt;br /&gt;
$IDYES = 6;&lt;br /&gt;
// Make the call&lt;br /&gt;
$RetVal = w_MessageBox(0, &amp;quot;Hello There&amp;quot;, &amp;quot;Title&amp;quot;, $MB_YESNO | $MB_ICONINFORMATION);&lt;br /&gt;
If ( $RetVal == $IDYES )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;YES was pressed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;NO was pressed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of importing and using functions directly&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
DllImport(&lt;br /&gt;
			array&lt;br /&gt;
			(&lt;br /&gt;
				'@AddBefore:w_', // Makes the APIs start with w_ so MessageBox = w_MessageBox&lt;br /&gt;
				// User32.dll&lt;br /&gt;
				array('User32.dll', 'MessageBox', 'Int32', 'ippi', 'Unicode'),&lt;br /&gt;
				array('User32.dll', 'GetMessageExtraInfo', 'Int32', '', ''),&lt;br /&gt;
				array('User32.dll', 'MapVirtualKey', 'UInt32', 'II', ''),&lt;br /&gt;
				array('User32.dll', 'keybd_event', '', 'bbIi', ''),&lt;br /&gt;
				array('User32.dll', 'VkKeyScan', 'Int16', 's', ''),&lt;br /&gt;
				array('User32.dll', 'SendInput', 'UInt32', 'Iti', ''),&lt;br /&gt;
				array('User32.dll', 'GetAsyncKeyState', 'Int16', 'I', ''),&lt;br /&gt;
				array('User32.dll', 'GetKeyState', 'Int16', 'I', ''),&lt;br /&gt;
				// Kernel32.dll&lt;br /&gt;
				array('Kernel32.dll', 'GetTickCount', 'Int32', '', ''),&lt;br /&gt;
				array('Kernel32.dll', 'GetTickCount64', 'Int64', '', '')&lt;br /&gt;
			)&lt;br /&gt;
);&lt;br /&gt;
// Setup a few variables&lt;br /&gt;
$MB_YESNO = 0x04;&lt;br /&gt;
$MB_ICONINFORMATION = 0x40;&lt;br /&gt;
$IDYES = 6;&lt;br /&gt;
// Make the call&lt;br /&gt;
$RetVal = w_MessageBox(0, &amp;quot;Hello There&amp;quot;, &amp;quot;Title&amp;quot;, $MB_YESNO | $MB_ICONINFORMATION);&lt;br /&gt;
If ( $RetVal == $IDYES )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;YES was pressed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;NO was pressed&amp;quot;);&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://ubersoft.org/Sputnik/wiki/index.php/Version_History</id>
		<title>Version History</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Version_History"/>
				<updated>2015-09-20T16:56:02Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Sputnik 0.32 @ 18-09-2015 08:04 PM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik 0.33 @ 20-09-2015 05:55PM ==&lt;br /&gt;
* Def has been renamed to Const since Def was confusing for some people&lt;br /&gt;
* Sputnik classes have been reworked massively internally and now use a lot less ram and should be faster too bascially before this change all new className() would create a new instance of the class (which is a fairly big object) but now only one instance of the class ever exists at a time and instead of creating new ones it simply refs the existing one with an array of the class variables (and id etc) so each individual class you create are all using the same class but different internal array&lt;br /&gt;
* Classes no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* Enums no longer require a ; after their declaration (when stand alone)&lt;br /&gt;
* You can now embed Functions inside IF statements (or any statement) using the Embedded keyword before the function also you must include a ; after the final }&lt;br /&gt;
* You can now embed Classes inside IF statements (or any statement) using the Embedded keyword before the class also you must include a ; after the final }&lt;br /&gt;
* You can now embed NAMED Enums inside IF statements (or any statement) using the Embedded keyword before the enum also you must include a ; after the final }&lt;br /&gt;
* Removed Compile() function it was a useless thing (now) that should have been removed in 0.32 but I forgot to do so&lt;br /&gt;
* Removed UnuseAssembly()&lt;br /&gt;
* Drastic performance increase on Str2Hex()&lt;br /&gt;
* Drastic performance increase on Hex2Str()&lt;br /&gt;
* StrIndex() now returns a CHAR instead of STRING (if getting) and returns NULL on failures instead of alternating between empty strings and false also it is now faster too&lt;br /&gt;
* Added TrimToNull() it will trim a string to the first null char it finds (zero)&lt;br /&gt;
* StrShuffle() is now faster&lt;br /&gt;
* Fixed bug in StrVersCmp() where it only compared the str1 to the length of str2 then stopped now it properly does all the str1&lt;br /&gt;
* StrVersCmp() now returns the proper diff instead just -1, 0, 1&lt;br /&gt;
* StrTr() now returns NULL on failure and no longer has an exception if an invalid array is given (or no array)&lt;br /&gt;
* WordWrap() improved massively it is now faster and works a lot better and no longer has any chance of failing to wrap properly and all bugs are fixed&lt;br /&gt;
* Removed GUIInvoke() from SputnikOldGui.dll&lt;br /&gt;
* Added GUISendToBack() and GUISendToFront() to the SputnikOldGui.dll to replace the removed GUIInvoke()&lt;br /&gt;
* As a result of the above new functions the IDE now properly works once again&lt;br /&gt;
* Added @Argc it contains the number of arguments in @Argv so @Argc is bascially Count(@Argv)&lt;br /&gt;
* Sputniks internal ReturnStruct no longer uses &amp;quot;ref&amp;quot; keyword so any plugins/commands will need to remove &amp;quot;ref&amp;quot; when using it other than that no real differance&lt;br /&gt;
* Made some minor improvements to how -&amp;gt; is handled internally&lt;br /&gt;
* Improved speed of objects a little bit should help with classes etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.32 @ 18-09-2015 08:04 PM ==&lt;br /&gt;
* Since Sputnik has been used as a *library* for some time now and even more so with the current push to make all Sputniks functions available in the SpkLib class it has been decided to remove all *code* obfusctation and control flow alternations from Sputnik this should make Sputnik run a bit faster (especially so for games)&lt;br /&gt;
* Removed % operator for DotNet usage since it has been decided Sputty doesnt need it (this change also removes anything that makes use of the DotNet system Sputnik was using from the % operator)&lt;br /&gt;
* Removed Fixed() statement and CharPtr (char*) from Sputnik since it was confusing to have it in and it not needed anymore (it was good a LONG time ago but not anymore)&lt;br /&gt;
* Use() can now use an array for first param that contains a type name followed by namespace name this will be used as normal (as if you just used namespace only as usual) but since you also provided a type name Sputnik will try find that type and if it happens to be a Sputnik plugin it will load and activate it this allows Managed C++ plugins to work properly just like C# plugins do (with a bit extra typing of course)&lt;br /&gt;
* Fixed CommandSystem in lib which also fixed ConsoleServer example etc&lt;br /&gt;
* SocketConnect() no longer crashes if it doesnt connect but instead returns FALSE so you can now do SocketConnect(~~) or die('bla'); etc&lt;br /&gt;
* Improved SocketShutdown() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSendTo() the same as SocketConnect() and also made it cast a variable to binary if its not already&lt;br /&gt;
* Improved SocketSendFile() the same as SocketConnect()&lt;br /&gt;
* Improved SocketSend() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReceive() the same as SocketConnect()&lt;br /&gt;
* Improved SocketReadLine() the same as SocketConnect() also it will return NULL on failures instead of an empty string so you can tell them apart&lt;br /&gt;
* Improved SocketReadChar() the same as SocketReadLine()&lt;br /&gt;
* Improved SocketPoll() the same as SocketConnect()&lt;br /&gt;
* Improved SocketOpt() the same as SocketConnect() also failures will return NULL&lt;br /&gt;
* Improved SocketListen() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIsBound() the same as SocketOpt()&lt;br /&gt;
* Improved SocketIp() the same as SocketOpt() and fixed a bug where if you entered invalid key it would not have an issue&lt;br /&gt;
* Improved SocketHandle() the same as SocketOpt()&lt;br /&gt;
* Improved SocketClose() the same as SocketOpt()&lt;br /&gt;
* Improved SocketBind() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAvailable() the same as SocketOpt()&lt;br /&gt;
* Improved SocketAccept() the same as SocketOpt()&lt;br /&gt;
* Improved SocketCreate() the same as SocketOpt()&lt;br /&gt;
* Improved SSApprove() to only return false on failures instead of exceptions&lt;br /&gt;
* Improved SSClientIP() to only return NULL on failures instead of exceptions&lt;br /&gt;
* Improved SSClientStatus() the same as SSClientIP()&lt;br /&gt;
* Improved SSDisapprove() the same as SSApprove()&lt;br /&gt;
* Improved SSDrop() the same as SSApprove()&lt;br /&gt;
* Improved SSRead() the same as SSClientIP()&lt;br /&gt;
* Improved SSRecv() the same as SSClientIP()&lt;br /&gt;
* Improved SSSend() the same as SSApprove()&lt;br /&gt;
* Improved HostResolve() to return NULL on failure&lt;br /&gt;
* BinaryIndexOfAny() supports proper start/length position stuff of Sputnik&lt;br /&gt;
* Added IsHashAny() it works similar to IsHash() but will trigger if at least one element is&lt;br /&gt;
* Changed Trainer examples to use the new SpkProc since the old read/write have been replaced with it&lt;br /&gt;
* Updated Dark Earth Trainer to store its data in JSON to avoid issues reading it in future&lt;br /&gt;
* Added HasFlag() it can be used to check if an instance of an enum contains a given flag or an array of flags&lt;br /&gt;
* Added SetFlag() it can be used to set a flag (or array of flags) on/off in the enum instance&lt;br /&gt;
* Added HasFlagAny() it works like HasFlag() but returns true if at least one flag matches instead of requiring them all to&lt;br /&gt;
* Fixed a possible exception from IntToRom() so it will return an empty string instead&lt;br /&gt;
* Hash() now uses UTF8 and all return values are UInt64 instead of Int64 this makes it look a bit better since it doesnt produce negative numbers anymore also any chance of an overflow exception has been fixed&lt;br /&gt;
* Fixed several places in Spuntik that look at 0x followed by hex digits and the x was not being checked for case so only x would work no X&lt;br /&gt;
* Fixed a crash where StrNew() would evenutally cause a memory exception to explode and kill Sputnik (it correctly allocates now)&lt;br /&gt;
* StrChr() now has a param for length&lt;br /&gt;
* Strpbrk() now has a param for length&lt;br /&gt;
* StrrChr() now has a param for length&lt;br /&gt;
* Changed how the index param works on StrIndex() it now works the same as the one in SubStr() does&lt;br /&gt;
* StripCSlashes() speeded up a bit by fixing a bug that made it copy the string for no reason&lt;br /&gt;
* Modified InStr() a bit and improved it a lot its flag is now a boolean for IgnoreCase it now returns -1 on failure (instead of 0) however it still maintains returning 0 on success also the position it returns (when valid) has been fixed so it correctly starts at the index and that index can be used in substr immediately the start can now be negative like substr() and there is a new length param the same as substr() and finally fixed a bug where it scans the needles length in the haystack even if the neddle is going DEEP past the null terminator which could crash Sputnik&lt;br /&gt;
* Removed InStrRev() from lib folder (it was outdated and slow) will add a new speedy one soon&lt;br /&gt;
* Added InStrRev() it works similar to InStr() but instead of searching from left to right it searches from right to left it is very fast (just like InStr()) however it only starts inside the start/length you give it and not beyond that so if you want to search half your string set start to 0 and length to strlen / 2&lt;br /&gt;
* Fixed a bug in InStr() (and indirectly InStrRev()) where if the item was not found it may return -2 or something now the cap is -1&lt;br /&gt;
* StrCmp() now has start/length params&lt;br /&gt;
* StrStr() now has start/length params and it returns NULL on failure instead of FALSE and fixed a bug where if the match was the first char in the string it would return NULL&lt;br /&gt;
* StrPos() offset param has been removed and replaced with start/length params (This will break any scripts using StrPos() but it is a very minor change all you do is shift the offset to after the flags and everything will work again)&lt;br /&gt;
* Added StrDup() it is just a simple duplication function for strings (similar to clone() does)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.31 @ 14-09-2015 10:18 PM ==&lt;br /&gt;
* ReadMem() has been changed to use UnpackSingle() instead of Unpack() so only one thing can be read at a time (but you can of course read entire chunks of ram and process it using Unpack()) also there is no &amp;quot;binary&amp;quot; def anymore instead you simply do not include a def at all and it iwl use the size to read the many bytes and return it as raw bytes&lt;br /&gt;
* &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; all now support negative shifting a negative shift will bascially abs the value (make it positive) then reverse the shift so &amp;lt;&amp;lt; becomes &amp;gt;&amp;gt; and so on thanks to electrojustin for the idea&lt;br /&gt;
* Exponents operator ** will now use double if either side is a double (instead of only using double if both sides were not int)&lt;br /&gt;
* It was possible for LEFT side to become NULL of a += etc if the RIGHT side was internally a null (C# null) it is now handled correctly and the RIGHT is set to a NULL SV ($variable) instead&lt;br /&gt;
* Bitshifting operators now handle their conversions a bit better (flipping data types) and the &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; now always return a UInt64 (unless the LEFT is a float/double in which event it will return a Double)&lt;br /&gt;
* Class stuff like $a-&amp;gt;test() now correctly display an error if $a is not a class or the function isnt found&lt;br /&gt;
* Added ?-&amp;gt; operator which can be used like $a?-&amp;gt;test() or chained like $a?-&amp;gt;$child?-&amp;gt;$child2?-&amp;gt;test() the ?-&amp;gt; operator is basically saying, if the object to the left is not null, then fetch what is to the right, otherwise return null and halt the access chain&lt;br /&gt;
* Improved some internal IsNumeric stuff so it can handle - properly&lt;br /&gt;
* Fixed GetFullPath() so it no longer returns paths with \ on end of files&lt;br /&gt;
* Added Op() it can be used to create binary for example instead of typing bin(0x1C, 0x20, 0x30, 0x40) you can type op(&amp;quot;1C 20 30 40&amp;quot;)&lt;br /&gt;
* Added new internal class (the first of it's kind) called SpkProc (available on Windows only) it can be used to hook onto a running program by either its finding its window name or process name amd once attached it can get all kinds of information such as the id, handle, nativeHandle&lt;br /&gt;
* SpkProc can read/write memory, inject dlls and scan for byte sequences (with ?? bytes) and locate the address of it&lt;br /&gt;
* SpkProc can execute assembly scripts to patch/unpatch the process by injecting assembly code and doing a variety of useful features including spawning threads, allocating ram, giving full access to ram this feature comes courtasy of CE's Auto Assembler converted into a DLL for Sputnik to use nice and easily to use this ability you must include SputnikAsm.dll with your project&lt;br /&gt;
* SpkProc the purpose of this class is to provide an easy interface to manage a program/game's memory and inject code/dlls and generally do a lot of useful things (Sure Sputnik already has a ReadMem/WriteMem but SpkProc provides a more serious interface than just read/write)&lt;br /&gt;
* Fixed Hex() command so Hex(1033) will become &amp;quot;409&amp;quot; instead of &amp;quot;0000000000000409&amp;quot; by making the default *length* -1 and making it so -1 just makes as many hex as it can without silly trailing zeros (unless a zero is part of the hex of course)&lt;br /&gt;
* WordWrap has been improved a little bit and now handles 0 width properly and allocates ram better&lt;br /&gt;
* Added OffsetCalc() this function is used to calculate the START and LENGTH of an array index 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;
* Added DiffCalc() it can take two values and calculate the difference  between them 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;
* Added StrIncrement() it works the same way as doing ++ on a string like $a++&lt;br /&gt;
* If the first param in BinaryConcat() is an array with the first element as a reference to a binary variable and the second as a binary variable it will use the ref to be the result of the concat and the second one as the separator&lt;br /&gt;
* Almost all binary functions accept non binary variables and will either convert it to binary or use it as binary instead of failing&lt;br /&gt;
* Fixed a bug is IsXDigit() where it would not recognize a-f but A-F was fine&lt;br /&gt;
* BinaryIndexOf() now supports start, length stuff like SubStr() and if the needle isnt a byte or char it will cast it to binary (if its not already) and use that instead&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.30 @ 26-06-2015 03:33 PM ==&lt;br /&gt;
* Added Linux/Mac support back in because electrojustin uses Linux and wanted to use Sputnik (as long as at least one person is interested in such things I will keep it Linux compatible) of course Windows specific features and functions that require Windows APIS will not be available but everything else will be&lt;br /&gt;
* Fixed the TestCases to work properly on Linux (case sensitive file system was being annoying)&lt;br /&gt;
* Parser() no longer cries and crashes if you have certain symbols in the path string to the grammar sheet&lt;br /&gt;
* tr/a-z/A-Z/ and it's alias y/a-z/A-Z/ now works if stand alone on the $_ variable&lt;br /&gt;
* If you define a function like &amp;quot;Function Test&amp;quot; and do not include the () after the function name then it will automatically set itself to ARGS TRUE since it will assume you want to use the $args variable&lt;br /&gt;
* Fixed Vec() to correctly handle bits below 8 which means it can now work with BITS properly&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.29 @ 25-06-2015 08:40 AM ==&lt;br /&gt;
* Improved the Preprocessor a bit&lt;br /&gt;
* Added #unpredef which can remove a #predef variable&lt;br /&gt;
* When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on&lt;br /&gt;
* You can now use #include &amp;quot;filename.spk&amp;quot; to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name&lt;br /&gt;
* The #include &amp;quot;filename.spk&amp;quot; now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily&lt;br /&gt;
* Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.&lt;br /&gt;
* CoreFunctionExists() added for easy checking if a core function exists&lt;br /&gt;
* CoreFunctionList() added for easy getting a list of all core functions&lt;br /&gt;
* UnsetClass/Function etc etc no longer throw an exception if its not found but still return false&lt;br /&gt;
* Fixed StrShuffle() it no longer crashes due to out of bounds nonsense&lt;br /&gt;
* ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it&lt;br /&gt;
* Fixed a bug where if you &amp;quot;($i++) x 3;&amp;quot; on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator &amp;quot;xx&amp;quot;&lt;br /&gt;
* ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function&lt;br /&gt;
* LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* Added IncompleteClass it will be used when something fails to make a class properly&lt;br /&gt;
* When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead&lt;br /&gt;
* Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)&lt;br /&gt;
* A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused&lt;br /&gt;
* Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions&lt;br /&gt;
* Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given&lt;br /&gt;
* VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on&lt;br /&gt;
* VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing&lt;br /&gt;
* VarTypeFromString() added it can convert a raw type (in string form) of a variable (&amp;quot;String&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing&lt;br /&gt;
* VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object (&amp;quot;Class&amp;quot; etc) into a raw type (number) again&lt;br /&gt;
* VarScopeToString() added same as above it will convert a raw type of a var scope into a string&lt;br /&gt;
* VarScopeFromString() same a sabove it will convert a string into a raw var scope&lt;br /&gt;
* ScopeToString() added same as above it will convert a raw type of a scope into a string&lt;br /&gt;
* ScopeFromString() same a sabove it will convert a string into a raw scope&lt;br /&gt;
* Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)&lt;br /&gt;
* You can now do foreach($lines) and it will automatically add &amp;quot;as my $_&amp;quot; (without quotes) for you&lt;br /&gt;
* You can now regexp match like &amp;quot;m/^start/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* You can now regexp replace like &amp;quot;s/^start/test/&amp;quot; (without quotes) and skip the &amp;quot;$a =~ &amp;quot; (without quotes) part and it will use $_ automatically&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this &amp;amp;&amp;amp; $that -- is handed like: If $this is true, return $that, else return $this.&lt;br /&gt;
* Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.&lt;br /&gt;
* Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator&lt;br /&gt;
* Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode&lt;br /&gt;
* You can now (once again) place raw words inside the [ ] within an index of a string for example say(&amp;quot;value is $val[test]&amp;quot;); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the '' will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include &amp;quot;&amp;quot; yourself (escaped of course)&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.28 @ 19-06-2015 07:12 PM ==&lt;br /&gt;
* Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)&lt;br /&gt;
* Fixed the [Args(&amp;quot;true/false&amp;quot;)] by default being set to FALSE (it was set to TRUE by default for some unknown reason)&lt;br /&gt;
* Fixed a bug where if you do &amp;quot;$b[$pos++] = $c;&amp;quot; it would cause the $pos to increase TWICE&lt;br /&gt;
* TB() added it will convert a string to number (network-order UInt32)&lt;br /&gt;
* BT() added it will convert a number (network-order UInt32) to string&lt;br /&gt;
* Removed &amp;lt;..&amp;gt; operator (since .. is the same thing)&lt;br /&gt;
* Added new flag to IsDeclared() so you can check max depth local scope&lt;br /&gt;
* SSRecv() no longer returns the IP (you must use SSClientIP() for that)&lt;br /&gt;
* Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail&lt;br /&gt;
* Fixed a glitch with &amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)&lt;br /&gt;
* EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum&lt;br /&gt;
* Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly&lt;br /&gt;
* If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault&lt;br /&gt;
* FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()&lt;br /&gt;
* FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in&lt;br /&gt;
* ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast&lt;br /&gt;
* GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension&lt;br /&gt;
* FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB&lt;br /&gt;
* Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value&lt;br /&gt;
* FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text&lt;br /&gt;
* Added &amp;quot;rw&amp;quot; flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)&lt;br /&gt;
* FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* GetRelativePath() added it tires to makes a path relative to another&lt;br /&gt;
* SocketReadChar() added it will read the next char it can find (and wait until it gets one)&lt;br /&gt;
* SocketReadLine() added it will read the next line it can find (and wait until it gets one)&lt;br /&gt;
* Improved internal disposing of sockets when unset() is called&lt;br /&gt;
* FileMove() added for obvious reasons&lt;br /&gt;
* ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console&lt;br /&gt;
* ConsoleCapsLock() added it can be used to check if caps lock is down on the console&lt;br /&gt;
* COnsoleSetCursor() added to make it so you can set the x+y in one function&lt;br /&gt;
* COnsoleSetBuffer() added to make it so you can set the width+height in one function&lt;br /&gt;
* COnsoleSetSize() added to make it so you can set the width+height in one function&lt;br /&gt;
* Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff&lt;br /&gt;
* Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)&lt;br /&gt;
* Added ability to use a TRUE flag on InputC() to get more information about the key pressed&lt;br /&gt;
* Added all the @KeyConsole____ macros for checking console keys&lt;br /&gt;
* The first param of ClassList() may now be null to act as if you didnt enter a first param&lt;br /&gt;
* Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name&lt;br /&gt;
* Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like &amp;lt;  and &amp;gt; operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)&lt;br /&gt;
* sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc&lt;br /&gt;
* SumDouble() added for the LINQ&lt;br /&gt;
* SumInt() added for the LINQ&lt;br /&gt;
* SumUInt() added for the LINQ&lt;br /&gt;
* First() added for the LINQ&lt;br /&gt;
* FirstOrDefault() added for the LINQ&lt;br /&gt;
* Last() added for the LINQ&lt;br /&gt;
* LastOrDefault() added for the LINQ&lt;br /&gt;
* Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.27 @ 14-06-2015 01:15 PM ==&lt;br /&gt;
* Defaults work on all possible function param types now (instead of what they worked on before)&lt;br /&gt;
* You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);&lt;br /&gt;
* The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc&lt;br /&gt;
* The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe&lt;br /&gt;
* Include() and Require() should now correct handle the #include-once and #require-once and behave properly&lt;br /&gt;
* BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs&lt;br /&gt;
* BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs&lt;br /&gt;
* Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings&lt;br /&gt;
* PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly&lt;br /&gt;
* UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from&lt;br /&gt;
* Added numerous checks to the NBT system to avoid any chances of exceptions or crashes&lt;br /&gt;
* Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it&lt;br /&gt;
* Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load&lt;br /&gt;
* IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string&lt;br /&gt;
* Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default&lt;br /&gt;
* All Stream___() function has been removed and will be replaced with something better soon&lt;br /&gt;
* Removed IsVarStream()&lt;br /&gt;
* Renamed SSSendBufferCreate() to SSBufferNew()&lt;br /&gt;
* Renamed SSSendBufferAppend() to SSBufferPut()&lt;br /&gt;
* Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)&lt;br /&gt;
* Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)&lt;br /&gt;
* Added new flag 'B' to SSRead() to read Byte (unsigned byte)&lt;br /&gt;
* Added new flag 'V' to SSRead() to read all remaining bytes&lt;br /&gt;
* SSApprove() no longer needs the server param&lt;br /&gt;
* SSClientIP() no longer needs the server param&lt;br /&gt;
* SSClientStatus() no longer needs the server param&lt;br /&gt;
* SSDisapprove() no longer needs the server param&lt;br /&gt;
* SSDrop() no longer needs the server param&lt;br /&gt;
* Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent&lt;br /&gt;
* ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc &lt;br /&gt;
* ByteBufferPut() added to put data into a ByteBuffer (adds to the end)&lt;br /&gt;
* ByteBufferGet() added to get data from a ByteBuffer (gets from current position)&lt;br /&gt;
* ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* ByteBufferCapacity) added get the current capacity of a ByteBuffer&lt;br /&gt;
* ByteBufferRewind() added to set the position of a ByteBuffer back to the start&lt;br /&gt;
* ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* ByteBufferPosition() added to get and set the position of a ByteBuffer to any value&lt;br /&gt;
* ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* ByteBufferMark() added to mark the position in a ByteBuffer&lt;br /&gt;
* ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* ByteBufferCompare() added compare two ByteBuffers to see if they are equal&lt;br /&gt;
* ByteBufferClone() added clone a ByteBuffer&lt;br /&gt;
* Completed all the ByteBuffer functions thus the replacement for Stream___() is complete&lt;br /&gt;
* Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions&lt;br /&gt;
* Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object&lt;br /&gt;
* Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded&lt;br /&gt;
* Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE&lt;br /&gt;
* Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)&lt;br /&gt;
* Removed the hardcoded 'to'  (it was a word for ..)&lt;br /&gt;
* Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)&lt;br /&gt;
* Fixed stuff that does like say(&amp;quot;cat $i&amp;quot;) foreach($a as my $i); and say(&amp;quot;cat $i&amp;quot;) for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed&lt;br /&gt;
* Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.26 @ 07-06-2015 10:08 AM ==&lt;br /&gt;
* Sputnik now comes with &amp;quot;XNA Pengo&amp;quot; a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its &amp;quot;Readme.txt&amp;quot; for more information&lt;br /&gt;
* Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the &amp;quot;Embed Sputnik&amp;quot; folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik&lt;br /&gt;
* Sputnik now comes with &amp;quot;Compiler.exe&amp;quot; (console mode) and &amp;quot;CompilerW.exe&amp;quot; (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
* %DotNet-&amp;gt;Calls() are now much faster as it caches all the methods&lt;br /&gt;
* Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)&lt;br /&gt;
* SSSendBufferCreate can now be used with 0 params&lt;br /&gt;
* The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces&lt;br /&gt;
* Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing&lt;br /&gt;
* List() arguments also benefit from the fuction argument improvement&lt;br /&gt;
* Fixed a bug on XNA lib for Update/Draw&lt;br /&gt;
* Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up&lt;br /&gt;
* Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default &amp;quot;$var = 10&amp;quot; stuff but can now do stuff like &amp;quot;NBTTagCompound $var = newTag()&amp;quot; for a param&lt;br /&gt;
* SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient&lt;br /&gt;
* Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:&lt;br /&gt;
* NBT() Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* NBTNew() Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* IsVarNBT() Check if a variable is contains an NBT&lt;br /&gt;
* NBTCompare() Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* NBTCopy() Make a clone of an NBT&lt;br /&gt;
* NBTGetId() Get the ID type of an NBT&lt;br /&gt;
* NBTGetName() Get the name (tag key) of an NBT&lt;br /&gt;
* NBTGetName() Set the name (tag key) of an NBT&lt;br /&gt;
* NBTHash() Compute the CRC32 hash of an NBT&lt;br /&gt;
* NBTToString() Return a string representation of an NBT&lt;br /&gt;
* NBTToVar() Return the Sputnik variable representation of an NBT&lt;br /&gt;
* NBTCompoundClear() Clear all tags&lt;br /&gt;
* NBTCompoundCount() Return the amount of tags&lt;br /&gt;
* NBTCompoundGet() Get a tag by name&lt;br /&gt;
* NBTCompoundSet() Set a tag by name&lt;br /&gt;
* NBTCompoundGetKeys() Get an array of all keys&lt;br /&gt;
* NBTCompoundGetTags() Get an array of all tags&lt;br /&gt;
* NBTCompoundGetMap() Get an associative array of all keys and tags&lt;br /&gt;
* NBTCompoundHasKey() Check if a given tag exists by name&lt;br /&gt;
* NBTCompoundIsEmpty() Check if there are no tags&lt;br /&gt;
* NBTCompoundRemove() Remove a specific tag by name&lt;br /&gt;
* NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* NBTCompoundWriteFile() Write the NBTTagCompound to a file&lt;br /&gt;
* NBTCompoundReadFile() Create a new NBTTagCompound from reading a file&lt;br /&gt;
* NBTCompoundCompress() Compress the NBTTagCompound to binary&lt;br /&gt;
* NBTCompoundDecompress() Decompress a NBTTagCompound from binary&lt;br /&gt;
* NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer&lt;br /&gt;
* NBTListAppend() Add an NBT to the end of the list &lt;br /&gt;
* NBTListCount() Return how many tags exist in the list &lt;br /&gt;
* NBTListGet() Get a tag at the given index &lt;br /&gt;
* NBTListHasId() Check if an index is valid and contains a tag &lt;br /&gt;
* NBTListRemove() Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.25 @ 16-12-2014 08:06 AM ==&lt;br /&gt;
&lt;br /&gt;
* There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted&lt;br /&gt;
* HTTPGetString improved&lt;br /&gt;
* If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work&lt;br /&gt;
* There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it&lt;br /&gt;
* MySQLConnect() can now correctly use the port using :PORT without crashing&lt;br /&gt;
* If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash&lt;br /&gt;
* Negating a null or disposed SV now sets its value to TRUE&lt;br /&gt;
* Fixed Stack.spk it fell victim to the &amp;quot;function name will use class function before core*&lt;br /&gt;
* RPNCalculator example now works again&lt;br /&gt;
* SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)&lt;br /&gt;
* Many improvements to the internal workings of the SV ($var)&lt;br /&gt;
* The Interactive Shell now shows correct version/website and stuff like &amp;quot;say&amp;quot;, &amp;quot;print&amp;quot; etc no longer display a return value&lt;br /&gt;
* Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything&lt;br /&gt;
* Added HTTPParseQuery() it can parse an HTTP query string back into an array&lt;br /&gt;
* If you have a class function named like &amp;quot;push&amp;quot; and you wish to use the Sputnik core function &amp;quot;push&amp;quot; inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name&lt;br /&gt;
* The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added&lt;br /&gt;
* DotNet operations such $var-&amp;gt;FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc&lt;br /&gt;
* Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)&lt;br /&gt;
* CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)&lt;br /&gt;
* StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)&lt;br /&gt;
* Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)&lt;br /&gt;
* The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them&lt;br /&gt;
* The StringBuilders from SbNew() work in Count() to get the length&lt;br /&gt;
* The StringBuilders from SbNew() can now use .= and ..= operators for easy concat&lt;br /&gt;
* Added SbAppend() to append text to a StringBuilder&lt;br /&gt;
* Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become &amp;lt;br /&amp;gt; if necessary although it defaults at \n unless cgi is used&lt;br /&gt;
* Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value&lt;br /&gt;
* Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed&lt;br /&gt;
* Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)&lt;br /&gt;
* Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length&lt;br /&gt;
* Added sbReplaceAt() it can replace from a start index to a length with a given string&lt;br /&gt;
* Added SbGetIndex() it can insert get the char at a given index in the StringBuilder&lt;br /&gt;
* Added SbSetIndex() it can insert set a char at a given index in the StringBuilder&lt;br /&gt;
* Added SbGetCapacity() it can get the capacity of a StringBuilder&lt;br /&gt;
* Added SbSetCapacity() it can set the capacity of a StringBuilder&lt;br /&gt;
* Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder&lt;br /&gt;
* Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLEncode() It can convert a string to an HTML-encoded string&lt;br /&gt;
* Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string&lt;br /&gt;
* Added UrlEncode() It can encode a URL string&lt;br /&gt;
* Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string&lt;br /&gt;
* Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation&lt;br /&gt;
* Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()&lt;br /&gt;
* Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes&lt;br /&gt;
* Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.24 @ 29-11-2014 01:05 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit&lt;br /&gt;
* If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this-&amp;gt;FuncName() was always calling the class function just like $cls-&amp;gt;FuncName() so this just changes calls from inside the class)&lt;br /&gt;
* FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems&lt;br /&gt;
* Many changes to macros make sure to read Macro page on wiki&lt;br /&gt;
* Time() function deleted&lt;br /&gt;
* @Epoch macro added to take over from Time() since it does the exact same thing Time() did&lt;br /&gt;
* Added Time() again this time it is used to construct a time instance&lt;br /&gt;
* Added Date() this is used similar to strftime() in C to create a formatted time&lt;br /&gt;
* You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()&lt;br /&gt;
* You can now get class property values by just doing its name like say $prop; you no longer need to do say $this-&amp;gt;$prop;&lt;br /&gt;
* Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols&lt;br /&gt;
&lt;br /&gt;
Known issues in current version:&lt;br /&gt;
* IDE compile without console is not currently working so don't use it&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b3 @ 14-08-2014 10:09 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.&lt;br /&gt;
* Fixed a bug where DLLs would get in use and cause stuff to crash&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b2 @ 14-08-2014 02:18 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* Properties can now use +=, *= etc etc and the other stuff&lt;br /&gt;
* $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Char* can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* $string[$index] can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* List () can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that&lt;br /&gt;
* Binary+CharPtr cast overload now works on classes&lt;br /&gt;
* Added &amp;lt;nowiki&amp;gt;~~~&amp;lt;/nowiki&amp;gt; it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type&lt;br /&gt;
* Added !~~ same as above but negative comparison&lt;br /&gt;
* @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args(&amp;quot;true&amp;quot;)] before the function definition&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23b1 @ 12-08-2014 02:23 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
&lt;br /&gt;
* This is just a Hot fix release to address the IDE not working... Should work now...&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.23 @ 08-11-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* Ord renamed to OrdW (Converts a char to UNICODE code)&lt;br /&gt;
* Added Ord() handles converting a char to ASCII code&lt;br /&gt;
* New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.&lt;br /&gt;
* Sputnik now uses a tweaked Mersenne Twister for random number generation&lt;br /&gt;
* Added BinaryRandom() so you can randomize a binary variable&lt;br /&gt;
* Added RandomVar() to generate random Int32, UInt32 etc etc and so on&lt;br /&gt;
* Added RandomSeed() to generate pretty good random seeds&lt;br /&gt;
* Say() and Println() can now be used with no params to insert a blank line into console&lt;br /&gt;
* Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server&lt;br /&gt;
* Added BinaryStartsWith()&lt;br /&gt;
* Added BinaryEndsWith()&lt;br /&gt;
* Added BinaryHash() to get a unique Hash of the bytes of a binary variable&lt;br /&gt;
* Added BinaryIndexOf() Find the first occurrence of the needle&lt;br /&gt;
* Added BinaryIndexOfAny() Find the first occurrence of any of the needles&lt;br /&gt;
* Added BinaryLastIndexOf() Find the last occurrence of the needle&lt;br /&gt;
* Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles&lt;br /&gt;
* Added Byte() and SByte() not sure why they were not already added...&lt;br /&gt;
* Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)&lt;br /&gt;
* Fixed (binary) cast it now works&lt;br /&gt;
* Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize&lt;br /&gt;
* BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes&lt;br /&gt;
* Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.&lt;br /&gt;
* Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &amp;amp;, ^, and ~.&lt;br /&gt;
* SocketConnected() fixed&lt;br /&gt;
* Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it&lt;br /&gt;
* MySQL is now working again.&lt;br /&gt;
* Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.&lt;br /&gt;
* $this is now correctly set on Unserialize()&lt;br /&gt;
* Arrays can now be defined with [ ] example $a = [&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;]; as well as the usual array() function&lt;br /&gt;
* Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)&lt;br /&gt;
* Added SocketIP() to get the local or remote IP of a socket&lt;br /&gt;
* Fixed a rare glitch that could deadlock threads&lt;br /&gt;
* Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console&lt;br /&gt;
* Offset param added to SocketSend()&lt;br /&gt;
* Eval flag 4 now supports the clean up if specified&lt;br /&gt;
* Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it&lt;br /&gt;
* Added EvalSet() it can be used to set variables inside an object made from EvalCreate()&lt;br /&gt;
* Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);&lt;br /&gt;
* BinaryInsert() overwrite is now working properly&lt;br /&gt;
* BinaryGet() now returns NULL on failure so it is possible to know it failed&lt;br /&gt;
* Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI&lt;br /&gt;
* Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so&lt;br /&gt;
* Sputnik is now better at handling more instances of Sputnik running in its ram&lt;br /&gt;
* Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim&lt;br /&gt;
* Added BinaryToLower() -- makes ASCII chars in the binary go lowercase&lt;br /&gt;
* Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase&lt;br /&gt;
* Added BinaryRemove() -- similar to substr() but removes the section from the binary&lt;br /&gt;
* Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part&lt;br /&gt;
* Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful&lt;br /&gt;
* Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does&lt;br /&gt;
* Added IsPrime() to check if a number is prime or not&lt;br /&gt;
* Fixed qq() and qqw() operators they was allowing a blank space to enter the array&lt;br /&gt;
* Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtSeparator&amp;quot; it is replaced with @Sep now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtBegin&amp;quot; it is replaced with @Begin now (for sprintf/printf)&lt;br /&gt;
* No longer need to make a key called &amp;quot;fmtEnd&amp;quot; it is replaced with @End now (for sprintf/printf)&lt;br /&gt;
* Override rule on Functions will now delete an existing custom function by same name when adding the new one&lt;br /&gt;
* Override rule now works on Enums just like it does on Functions&lt;br /&gt;
* Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error&lt;br /&gt;
* AddOnce rule now works on Functions like it does on Enums&lt;br /&gt;
* Added new macro @IsLittleEndian&lt;br /&gt;
* Added new macro @IsBigEndian&lt;br /&gt;
* Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary&lt;br /&gt;
* Improved Sputniks arrays a bit (internally) should be a tad bit faster&lt;br /&gt;
* Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast&lt;br /&gt;
* Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result&lt;br /&gt;
* Improve Array compares like == etc&lt;br /&gt;
* Fixed Sort() and Walk() they were broken since the change to return values&lt;br /&gt;
* Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches&lt;br /&gt;
* Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length&lt;br /&gt;
* Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle&lt;br /&gt;
* Added usleep() it can sleep the script for a given number of microseconds&lt;br /&gt;
* Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture&lt;br /&gt;
* Match() renamed to CSetMatch()&lt;br /&gt;
* MatchDel() renamed to CSetDel()&lt;br /&gt;
* Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).&lt;br /&gt;
* The -&amp;gt; can no longer be used to place a variable as the first argument in a function like &amp;quot;test&amp;quot;-&amp;gt;Substr(1, 3) instead you must use -&amp;gt;&amp;gt; so &amp;quot;test&amp;quot;-&amp;gt;&amp;gt;Substr(1, 3) is what you use now this change was done to make the classes/objects -&amp;gt; look entirely different from the force variable as first item in a function.&lt;br /&gt;
* Added new operator =&amp;gt;&amp;gt; it works similar to -&amp;gt;&amp;gt; but it will immediately place the return value into the variable so $a=&amp;gt;&amp;gt;substr(1); this will cause $a to become the result of the substr operation&lt;br /&gt;
* Fixed bitshift &amp;lt;&amp;lt;&amp;lt; and &amp;gt;&amp;gt;&amp;gt; they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64&lt;br /&gt;
* Operators + - / * % &amp;amp; | ^ &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt;&amp;lt;&amp;lt; &amp;gt;&amp;gt;&amp;gt; now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string&lt;br /&gt;
* Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i&lt;br /&gt;
* Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area&lt;br /&gt;
* List ( ) now sets all variables to null if it cant place stuff into them&lt;br /&gt;
* Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc&lt;br /&gt;
* Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? &amp;quot;test&amp;quot; will use &amp;quot;test&amp;quot; if and only if $a really is NULL&lt;br /&gt;
* When checking if a string is TRUE Sputnik will now try convert to a double so that &amp;quot;0.1&amp;quot; etc will return true where as before it would have said false&lt;br /&gt;
* Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose&lt;br /&gt;
* Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).&lt;br /&gt;
* LINQ functions deleted pending a full remake&lt;br /&gt;
* Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3&lt;br /&gt;
* Operator To example 10 to 20 has now been renamed to &amp;lt;-&amp;gt; so it is now 10 &amp;lt;..&amp;gt; 20&lt;br /&gt;
* All .NET array[] types are supported in Foreach now&lt;br /&gt;
* .NET array[] types can be refed in a foreach and have their value modified in real time&lt;br /&gt;
* Strings in a foreach can now be refed and have their chars modified in real time&lt;br /&gt;
* Foreach has been fixed so if you do a foreach with a ref &amp;quot;as&amp;quot; then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt&lt;br /&gt;
* Foreach can now handle List&amp;lt;&amp;gt; on both regular objects and dotnetObj&lt;br /&gt;
* Foreach can now handle IEnumerable on both regular objects and dotnetObj&lt;br /&gt;
* Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* Added BitSwap() it can byte-swap little-endian &amp;lt;-&amp;gt; big-endian in any int/float etc variable&lt;br /&gt;
* Added U for unsigned to hex literals example: 0x325U&lt;br /&gt;
* Added U for unsigned to binary literals example: 0b10101010101U&lt;br /&gt;
* Added U for unsigned to octal literals example: 063634U&lt;br /&gt;
* Added IsList() to check if an array is a proper list&lt;br /&gt;
* Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string&lt;br /&gt;
* Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string&lt;br /&gt;
* Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it&lt;br /&gt;
* Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref&lt;br /&gt;
* Added ContainsAny() works like Contains() but accepts an array of needles&lt;br /&gt;
* When doing divide by NULL in Sputnik it now returns zero instead of the original value&lt;br /&gt;
* You can now do stuff like foreach(array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration&lt;br /&gt;
* The operator =&amp;gt; has been given higher precedent so when you do stuff like array(&amp;quot;Cat&amp;quot; =&amp;gt; $flag &amp;amp; 1); it no longer fails to work&lt;br /&gt;
* Added ldexp()&lt;br /&gt;
* Added frexp()&lt;br /&gt;
* Added @TwoPI&lt;br /&gt;
* Added @ZeroTolerance&lt;br /&gt;
* Added Clamp()&lt;br /&gt;
* Added Lerp()&lt;br /&gt;
* Added Mod2PI()&lt;br /&gt;
* Added Wrap()&lt;br /&gt;
* Added Gauss()&lt;br /&gt;
* Added Barycentric()&lt;br /&gt;
* Added CatmullRom()&lt;br /&gt;
* Added RandomSeedSet()&lt;br /&gt;
* Added Angle2D()&lt;br /&gt;
* Added Distance()&lt;br /&gt;
* Added Distance2D()&lt;br /&gt;
* Added Distance3D()&lt;br /&gt;
* Added Hermite()&lt;br /&gt;
* Added SmoothStep()&lt;br /&gt;
* Added DegreesToRadians()&lt;br /&gt;
* Added RadiansToDegrees()&lt;br /&gt;
* Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).&lt;br /&gt;
* Added RevolutionsToDegrees()&lt;br /&gt;
* Added RevolutionsToRadians()&lt;br /&gt;
* Added RevolutionsToGradians()&lt;br /&gt;
* Added DegreesToRevolutions()&lt;br /&gt;
* Added RadiansToRevolutions()&lt;br /&gt;
* Added RadiansToGradians()&lt;br /&gt;
* Added GradiansToRevolutions()&lt;br /&gt;
* Added GradiansToDegrees()&lt;br /&gt;
* Added GradiansToRadians()&lt;br /&gt;
* Removed the -&amp;gt; from modifying strings in place since the new =&amp;gt;&amp;gt; handles modifying values now&lt;br /&gt;
* Added BinaryReplace() to search and replace the needle&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a binary variable in array form like $data[3] += 3&lt;br /&gt;
* You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &amp;amp;=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3&lt;br /&gt;
* Vec was somehow missing /=&lt;br /&gt;
* Vec can now use ||=, &amp;amp;&amp;amp;=, **=&lt;br /&gt;
* Byte type was broken when trying to do &amp;amp; with it&lt;br /&gt;
* Foreach when used on a string now sets the &amp;quot;as&amp;quot; to a char instead of a string with one char in it&lt;br /&gt;
* $var[index] when used on CharPtr and String returns a char instead of string now&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.22 @ 03-21-2014 05:54 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added BinaryUUEncode()&lt;br /&gt;
* Added BinaryUUDecode()&lt;br /&gt;
* Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change&lt;br /&gt;
* Vec() can now handle up to 64 bits&lt;br /&gt;
* Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )&lt;br /&gt;
* Fixed hilarious oversight that caused BinaryFromStr() to produce a string on &amp;quot;RAW&amp;quot; mode&lt;br /&gt;
* Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true&lt;br /&gt;
* Added new operator &amp;amp;&amp;amp;= used like $a &amp;amp;&amp;amp;= 7; will change $a to 7 if $a is true&lt;br /&gt;
* Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place&lt;br /&gt;
* print &amp;quot;$var\n&amp;quot; if($var); etc now works properly (foreach, while etc is also fixed)&lt;br /&gt;
* Operator ~ now works on strings like in Perl&lt;br /&gt;
* A &amp;quot;For&amp;quot; loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing &amp;amp;&amp;amp; but without the need for braces ()&lt;br /&gt;
* Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc&lt;br /&gt;
* Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.&lt;br /&gt;
* The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case&lt;br /&gt;
* WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument&lt;br /&gt;
* PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc&lt;br /&gt;
* You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE&lt;br /&gt;
* You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement&lt;br /&gt;
* When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors&lt;br /&gt;
* Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki&lt;br /&gt;
* Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)&lt;br /&gt;
* You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.&lt;br /&gt;
* Enums can now combine flags properly like $Test = $England + $France&lt;br /&gt;
* You can now declare functions inside a class as private so they can only be called from within the class itself&lt;br /&gt;
* Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding &amp;quot;union &amp;quot; in the DLLStruct definition example DllStructCreate(&amp;quot;union int a;float b&amp;quot;);&lt;br /&gt;
* When a DLLStruct is created all its allocated memory is now zeroed out automatically&lt;br /&gt;
* When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address&lt;br /&gt;
* Added @LOG2E // Log(@E, 2) = 1.4426950408889634074&lt;br /&gt;
* Added @LOG10E // Log10(@E) = 0.43429448190325182765&lt;br /&gt;
* Added @LN2 // Log(2) = 0.69314718055994530942&lt;br /&gt;
* Added @LN10 // Log(10) = 2.30258509299404568402&lt;br /&gt;
* Added @PI_2 // @PI/2 = 1.57079632679489661923&lt;br /&gt;
* Added @PI_4 // @PI/4 = 0.78539816339744830962&lt;br /&gt;
* Added @1_PI // 1/@PI = 0.31830988618379067154&lt;br /&gt;
* Added @2_PI // 2/@PI = 0.63661977236758134308&lt;br /&gt;
* Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729&lt;br /&gt;
* Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390&lt;br /&gt;
* Added @SQRT2 // Sqrt(2) = 1.4142135623731&lt;br /&gt;
* Added @SQRT3 // Sqrt(3) = 1.73205080756887729352&lt;br /&gt;
* Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440&lt;br /&gt;
* Added @LNPI // Log(@PI) = 1.14472988584940017414&lt;br /&gt;
* Added @EULER // Euler constant = 0.57721566490153286061&lt;br /&gt;
* Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class&lt;br /&gt;
* Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = &amp;quot;Hello&amp;quot; this is better since there is no chance of elements appearing magically with no idea where they came from&lt;br /&gt;
* Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach&lt;br /&gt;
* Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array&lt;br /&gt;
* Fixed \L it was doing uppercase instead of lowercase&lt;br /&gt;
* [&amp;lt;&amp;gt;] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[&amp;lt;&amp;gt;], 3, 4 ) if $b is an array with &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot; then the new array will be array( 1, &amp;quot;dog&amp;quot;, &amp;quot;cat&amp;quot;, 3, 4 )&lt;br /&gt;
* The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return&lt;br /&gt;
* Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one&lt;br /&gt;
* Search() can now accept arrays for its value&lt;br /&gt;
* Fixed Clear()&lt;br /&gt;
* Added GUIRedraw()&lt;br /&gt;
* You can now create &amp;quot;ContextMenu&amp;quot; with GUICreate()&lt;br /&gt;
* Fixed all issues with the GUI Builder&lt;br /&gt;
* Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly&lt;br /&gt;
* Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;); notice how the $cat is increased and yet &amp;quot;no&amp;quot; is still returned&lt;br /&gt;
* InArray() can now accept an array as the needle&lt;br /&gt;
* Added IsOverloaded() to check of a given or array of given overloads exist within a class for use&lt;br /&gt;
* You can now place an array with [&amp;lt;&amp;gt;] attached to it to add its values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* You can now place an array with [&amp;lt;=&amp;gt;] attached to it to add its keys and values directly to an array() constructor such as array(&amp;quot;cat&amp;quot;, $a[&amp;lt;=&amp;gt;], &amp;quot;dog&amp;quot;)&lt;br /&gt;
* Added IsEven()&lt;br /&gt;
* Added IsOdd()&lt;br /&gt;
* $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string&lt;br /&gt;
* Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple&lt;br /&gt;
* IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor&lt;br /&gt;
* Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen&lt;br /&gt;
* Added EvalSyntax()&lt;br /&gt;
* GUICodeCode and GUICreate &amp;quot;CodeBox&amp;quot; it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE&lt;br /&gt;
* Added GUILinkValid()&lt;br /&gt;
* Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Added flag to Regex Match /b require all elements in an array match instead of any&lt;br /&gt;
* Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)&lt;br /&gt;
* Regex Match now supports Arrays in the While and Foreach loops&lt;br /&gt;
* Many new things added to GUIWindow()&lt;br /&gt;
* Eval() given a new flag so it can remove functions and classes that are spawned during the eval&lt;br /&gt;
* More options added to GUIPictureBox()&lt;br /&gt;
* Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control&lt;br /&gt;
* Added GUIHotkey() to get/set stuff in a HotkeyBox&lt;br /&gt;
* RealGetKeyState() supports more options and ability to use GUIHotkeyBox&lt;br /&gt;
* More options added to GUIListBox()&lt;br /&gt;
* More options added to GUIComboBox()&lt;br /&gt;
* Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels&lt;br /&gt;
* Fixed many examples&lt;br /&gt;
* Added constants for Console colours&lt;br /&gt;
* Added more options to GUIRichTextBox()&lt;br /&gt;
* FontDialog() returns null on cancel&lt;br /&gt;
* ColourDialog() returns null on cancel&lt;br /&gt;
* Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs&lt;br /&gt;
* Added GUICreate &amp;quot;Font&amp;quot;&lt;br /&gt;
* Added TimerInit()&lt;br /&gt;
* Added TimerDiff()&lt;br /&gt;
* Added Properties with Get/Set works the same as C# for use in Classes&lt;br /&gt;
* Added WinMenuSelectItem‎()&lt;br /&gt;
* Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way&lt;br /&gt;
* Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting&lt;br /&gt;
* Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it&lt;br /&gt;
* Added EnumAdd() it can dynamically add new keys and values to an enum at runtime&lt;br /&gt;
* Added EnumDel() it can dynamically delete new keys and values from an enum at runtime&lt;br /&gt;
* Added a series of flags to Random() to allow for generation it Int64 size random numbers&lt;br /&gt;
* Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)&lt;br /&gt;
* Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)&lt;br /&gt;
* Flags (such as Args-false etc) can now be added to Operator and Cast overload functions&lt;br /&gt;
* Keys() and Values() now have a flag to support getting just from hash/array&lt;br /&gt;
* Added IsKeysSet() to check if all/any/none of the keys provided are found in an array&lt;br /&gt;
* Linq function speed improved a tiny bit and cleans up its variables after use in While etc&lt;br /&gt;
* Renamed the Linq function &amp;quot;Select&amp;quot; to &amp;quot;Ret&amp;quot; to satisfy the parser&lt;br /&gt;
* The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6&lt;br /&gt;
* WinRAR 5.0 or later is now required to unrar the Sputnik archive you download&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.21 @ 09-28-2013 05:26 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added Metaphone()&lt;br /&gt;
* Added Soundex()&lt;br /&gt;
* Added Levenshtein()&lt;br /&gt;
* Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'&lt;br /&gt;
* Added Rot13()&lt;br /&gt;
* Added StrShuffle()&lt;br /&gt;
* Added StrTok()&lt;br /&gt;
* Added EscapeMeta() it works same as PHPs (QuoteMeta())&lt;br /&gt;
* Added EscapeShellArg()&lt;br /&gt;
* Added EscapeShellCmd()&lt;br /&gt;
* Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)&lt;br /&gt;
* Added ExecShell() same as Exec() but just returns the string&lt;br /&gt;
* Added ExecSystem() same as PHPs System() (but not same as Sputniks System())&lt;br /&gt;
* Added Passthru() which is just allows binary output to console etc&lt;br /&gt;
* Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters&lt;br /&gt;
* Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)&lt;br /&gt;
* Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)&lt;br /&gt;
* Added SubStrCmp()&lt;br /&gt;
* Added HTMLSpecialChars()&lt;br /&gt;
* Added HTMLSpecialCharsDecode()&lt;br /&gt;
* Added FmtNumber()&lt;br /&gt;
* Added PrintableEncode()&lt;br /&gt;
* Added PrintableDecode()&lt;br /&gt;
* Added StripTags() for stripping HTML tags from strings&lt;br /&gt;
* Added AddBR() for adding HTML breaks to strings at newlines&lt;br /&gt;
* Added Glob() has feature set same as PHP&lt;br /&gt;
* Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)&lt;br /&gt;
* Added Hebrev()&lt;br /&gt;
* Added Hebrevc()&lt;br /&gt;
* Added CountWords()&lt;br /&gt;
* Added HTMLEntities()&lt;br /&gt;
* Added HTMLEntityDecode()&lt;br /&gt;
* Added HTMLTranslationTable&lt;br /&gt;
* Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, &amp;lt;, &amp;gt;, &amp;lt;=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string&lt;br /&gt;
* Added Crypt() works similar to Perls&lt;br /&gt;
* Added /r flag to the tr/// for non-destructive&lt;br /&gt;
* You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)&lt;br /&gt;
* You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test &amp;quot;Cat&amp;quot;: this will create a Case &amp;quot;Cat&amp;quot;: as normal but with the added ID thrown in there&lt;br /&gt;
* When you do return; it no longer returns the last variable assignment instead it returns NULL&lt;br /&gt;
* Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select&lt;br /&gt;
* Added ability for Foreach to unpack nested arrays with List() statement&lt;br /&gt;
* Added Range() function for creation of arrays (works same as PHPs)&lt;br /&gt;
* Added Fill() works same as array_fill() in PHP&lt;br /&gt;
* Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys&lt;br /&gt;
* Added FillKeys() works same as array_fill_keys() in PHP&lt;br /&gt;
* Added Pad() works same as array_pad() in PHP&lt;br /&gt;
* You can now cast objects as binary like printr (binary)&amp;quot;Hello world&amp;quot;; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)&lt;br /&gt;
* Added Binary() function to cast an expression as binary like Binary(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
* Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)&lt;br /&gt;
* Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if &amp;quot;&amp;quot; strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)&lt;br /&gt;
* Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)&lt;br /&gt;
* Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense&lt;br /&gt;
* Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string&lt;br /&gt;
* Fixed a crash on InStr() if 4 parameters are used&lt;br /&gt;
* !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)&lt;br /&gt;
* Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings&lt;br /&gt;
* Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.&lt;br /&gt;
* Changed casting to char when used with strings so (char)&amp;quot;8364&amp;quot; no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number&lt;br /&gt;
* Added Char() function for converting an expression to a character (uses unicode)&lt;br /&gt;
* Added Binary Literals you define them like 0b101 (will print 5)&lt;br /&gt;
* Added Oct() function works the same as the one in Perl&lt;br /&gt;
* If you have a string like &amp;quot;0x34&amp;quot; or &amp;quot;0b101&amp;quot; it will be converted to an integer properly instead of returning 0&lt;br /&gt;
* Added Ord() function it is an alias for AscW()&lt;br /&gt;
* Added Chop()&lt;br /&gt;
* Added Chomp()&lt;br /&gt;
* Changed BinaryCompare() to return &amp;lt; 0, &amp;gt; 0 and = 0 same as StrCmp()&lt;br /&gt;
* Added two extra parameters to BinaryCompare() for offset and length of the compare&lt;br /&gt;
* Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to &amp;quot;RAW&amp;quot; in BinaryFromStr())&lt;br /&gt;
* BinaryMid() now accepts same start, length stuff that SubStr() does&lt;br /&gt;
* It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';&lt;br /&gt;
* Added BinaryStripNull() to remove all null bytes from a binary variable&lt;br /&gt;
* Fixed FileReadBinary() and StreamToBinary()&lt;br /&gt;
* Added UUEncode()&lt;br /&gt;
* Added UUDecode()&lt;br /&gt;
* Added DecOct()&lt;br /&gt;
* Added CRC32() for use on Strings etc&lt;br /&gt;
* Added BinaryCRC32()&lt;br /&gt;
* Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore&lt;br /&gt;
* You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag&lt;br /&gt;
* You can now do the =~ m/// Regexp match on arrays it will return the first match it finds &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.20 @ 09-19-2013 10:58 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Added FileRecycle() function to move files or folders to recycle bin&lt;br /&gt;
* Added FileRecycleEmpty() function to empty the recycle bin&lt;br /&gt;
* Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it&lt;br /&gt;
* Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead&lt;br /&gt;
* Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead&lt;br /&gt;
* Fixed a strange bug that was causing some ^= operations to be seen as &amp;amp;=&lt;br /&gt;
* Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())&lt;br /&gt;
* Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array&lt;br /&gt;
* GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)&lt;br /&gt;
* Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects&lt;br /&gt;
* &amp;quot;New&amp;quot; is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).&lt;br /&gt;
* Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)&lt;br /&gt;
* You can now use ¬ with q qq qw qww qx qqx&lt;br /&gt;
* You can now use , in Select() and Switch() statements so instead of doing just case &amp;quot;Dog&amp;quot;: you can do case &amp;quot;Dog&amp;quot;, &amp;quot;Cat&amp;quot;: and so on&lt;br /&gt;
* Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -&amp;gt; and enter classes name etc&lt;br /&gt;
* You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)&lt;br /&gt;
* Added Clone() function for cloning of classes&lt;br /&gt;
* Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again&lt;br /&gt;
* Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.19 @ 09-16-2013 10:25 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* LC(), Reverse() now use -&amp;gt; modify in place&lt;br /&gt;
* Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a-&amp;gt;Test() etc&lt;br /&gt;
* The repetition x and xx operators have been made to resolve the value each time making stuff like print(&amp;quot;CAT\n&amp;quot;) x 100; possible&lt;br /&gt;
* Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values&lt;br /&gt;
* Changed the - negative operator to switch from negative to positive rather than simply staying on negative&lt;br /&gt;
* Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr&lt;br /&gt;
* Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features&lt;br /&gt;
* Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features&lt;br /&gt;
* =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)&lt;br /&gt;
* Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array&lt;br /&gt;
* Made Foreach work with regex matches and added example to wiki&lt;br /&gt;
* Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)&lt;br /&gt;
* Changed @Groups macro to use local scope rather than global so there is now thread safe&lt;br /&gt;
* Added RegexEscape() works similar to preg_quote() in PHP&lt;br /&gt;
* Added RegexUnescape()&lt;br /&gt;
* Added Escape() for general escaping or custom escaping&lt;br /&gt;
* Added UnEscape() for general unescaping or custom unescaping&lt;br /&gt;
* Added AddCSlashes() works same as PHP function by same name&lt;br /&gt;
* q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice&lt;br /&gt;
* Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI&lt;br /&gt;
* Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD&lt;br /&gt;
* Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return &amp;lt;BR&amp;gt; instead useful if you want to have the same script work in console/webserver with no changes&lt;br /&gt;
* Added \m escape to strings works similar to \n in that it will do a newline or &amp;lt;BR&amp;gt; depending if the #cgi flag has been set&lt;br /&gt;
* Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out&lt;br /&gt;
* Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string&lt;br /&gt;
* Added `` strings works same as qx() so `dir` will return the output from dir&lt;br /&gt;
* Added @`` works same as `` however it does not resolve \n and $vars etc&lt;br /&gt;
* You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like &amp;quot;${Dog}Hello&amp;quot; and ability to use class stuff inside strings like &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;&lt;br /&gt;
* Added \o escape of ASCII Octal notation example &amp;quot;\o101&amp;quot; prints A and &amp;quot;\o1012&amp;quot; prints A2 (ASCII octal uses 3 characters)&lt;br /&gt;
* Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation&lt;br /&gt;
* Can now define \x escape as \x{nnn} (any valid number of characters)&lt;br /&gt;
* Added \R escape which is basically same as @CRLF it prints the same as &amp;quot;\r\n&amp;quot;&lt;br /&gt;
* Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding&lt;br /&gt;
* Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned&lt;br /&gt;
* Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;&lt;br /&gt;
* Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)&lt;br /&gt;
* Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that &amp;quot;sets&amp;quot; a variable).&lt;br /&gt;
* You can now use regex in a Switch() statement for example make a case like this case m/\w+/:&lt;br /&gt;
* You can now use number pattern in a Switch() statement for example make a case like this case 0..10:&lt;br /&gt;
* You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:&lt;br /&gt;
* You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':&lt;br /&gt;
* You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:&lt;br /&gt;
* You can now use arrays in a Switch() statement for example make a case like this case array(&amp;quot;Test&amp;quot;, &amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;): or a variable containing an array such as case $myarray: it will scan each value of the array for a match&lt;br /&gt;
* Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.&lt;br /&gt;
* Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?&amp;lt;name&amp;gt; subexpression)&lt;br /&gt;
* Added new regex /c flag causes it to ignore cultural differences in language.&lt;br /&gt;
* Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)&lt;br /&gt;
* Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)&lt;br /&gt;
* Added Warn() command to show a warning message with source file name and line number (same as in Perl)&lt;br /&gt;
* Added Time() function to return current Unix timestamp&lt;br /&gt;
* Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace&lt;br /&gt;
* Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened&lt;br /&gt;
* StrTr now fully works with Unicode (Was a glitch that didn't before) &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.18 @ 09-12-2013 01:42 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)&lt;br /&gt;
* Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()&lt;br /&gt;
* Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()&lt;br /&gt;
* Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones&lt;br /&gt;
* Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()&lt;br /&gt;
* Fixed a crash glitch with number patterns (0..1000)&lt;br /&gt;
* Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE&lt;br /&gt;
* Added modf() function&lt;br /&gt;
* Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)&lt;br /&gt;
* Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located&lt;br /&gt;
* Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match&lt;br /&gt;
* Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match&lt;br /&gt;
* Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first&lt;br /&gt;
* Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first&lt;br /&gt;
* Added LastIndexNotOfValue() same as above but this time returns the last non-match&lt;br /&gt;
* Added CountValues() works same as phps array_count_values()&lt;br /&gt;
* Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)&lt;br /&gt;
* The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future&lt;br /&gt;
* Fixed Shift() to reorder the array same as Order()&lt;br /&gt;
* Added StrSpn() function&lt;br /&gt;
* Added StrCSPn(() function&lt;br /&gt;
* Added StrCmp() function&lt;br /&gt;
* Added StrNatCmp() function (natural comparison)&lt;br /&gt;
* Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network&lt;br /&gt;
* Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc&lt;br /&gt;
* Classes call new reserve function __wakeup() when you unserialize them&lt;br /&gt;
* Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned&lt;br /&gt;
* Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)&lt;br /&gt;
* Fixed a bug where adding an array to itself would cause a crash instead of copying itself&lt;br /&gt;
$a = array();&lt;br /&gt;
$a[0] = &amp;quot;blah&amp;quot;;&lt;br /&gt;
$a[1] = $a;&lt;br /&gt;
* Added CombinePath() function&lt;br /&gt;
* Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL&lt;br /&gt;
* Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.&lt;br /&gt;
* Added StrVersCmp() function&lt;br /&gt;
* Added Strpbrk() function&lt;br /&gt;
* Fixed HTTP lib&lt;br /&gt;
* Added StrChr() function&lt;br /&gt;
* Added StrrChr() function&lt;br /&gt;
* Fixed a bug when \\ escape occurred immediately before the ending &amp;quot; when the line continued with an additional space&lt;br /&gt;
println(&amp;quot;C:\\&amp;quot;); // Where as this would fail &amp;lt;-- No longer fails&lt;br /&gt;
* Walk() now allows including the key with the value&lt;br /&gt;
* Printr() and VarDump() now print all the information about a class such as the content of its variables etc&lt;br /&gt;
* Added SumValues() works similar to phps array_sum()&lt;br /&gt;
* Added SumKeys()&lt;br /&gt;
* Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs&lt;br /&gt;
* Added IsNan() Function&lt;br /&gt;
* Added IsInf() Function&lt;br /&gt;
* Added IsPosInf() Function&lt;br /&gt;
* Added IsNegInf() Function&lt;br /&gt;
* Added IsNormal() Function&lt;br /&gt;
* Added SignBit() Function&lt;br /&gt;
* Added @Epsilon, @EpsilonF, @EpsilonD macros&lt;br /&gt;
* Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.&lt;br /&gt;
* Added new LINQ function From()&lt;br /&gt;
* Added new LINQ function AndFrom()&lt;br /&gt;
* Added new LINQ function NotFrom()&lt;br /&gt;
* Added new LINQ function Where()&lt;br /&gt;
* Added new LINQ function WhereNot()&lt;br /&gt;
* Added new LINQ function AndWhere()&lt;br /&gt;
* Added new LINQ function AndWhereNot()&lt;br /&gt;
* Added new LINQ function Size()&lt;br /&gt;
* Added new LINQ function OrderBy()&lt;br /&gt;
* Added new LINQ function OrderByDescending()&lt;br /&gt;
* Added new LINQ function OrderByAscending()&lt;br /&gt;
* Added new LINQ function First()&lt;br /&gt;
* Added new LINQ function FirstOrDefault()&lt;br /&gt;
* Added new LINQ function Last()&lt;br /&gt;
* Added new LINQ function LastOrDefault()&lt;br /&gt;
* Added new LINQ function Any()&lt;br /&gt;
* Added new LINQ function All()&lt;br /&gt;
* Added new LINQ function Invert()&lt;br /&gt;
* Added new LINQ function Select()&lt;br /&gt;
* (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)&lt;br /&gt;
* You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --&lt;br /&gt;
* Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers&lt;br /&gt;
* Added more functions to Pack and Unpack it can now convert to/from binary strings&lt;br /&gt;
* Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays&lt;br /&gt;
* You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);&lt;br /&gt;
* Added IsVarFP() to check if a variable type is ONLY a float/double nothing else&lt;br /&gt;
* SubStr() count can now be negative then that many characters will be omitted from the end of the string&lt;br /&gt;
* Added @'' string that is viewed as a Char so instead of doing (char)&amp;quot;\0&amp;quot; you can now do @'\0'&lt;br /&gt;
* Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)&lt;br /&gt;
* Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it&lt;br /&gt;
* It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes&lt;br /&gt;
* Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless&lt;br /&gt;
* Added GetVarObjTypeName()&lt;br /&gt;
* Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances&lt;br /&gt;
* Documented ClassName() it wasn't on wiki for some reason&lt;br /&gt;
* Added ClassStack() it will return a reference to a classes internal variable stack&lt;br /&gt;
* Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass(&amp;quot;Testy&amp;quot;);&lt;br /&gt;
* Changed how &amp;amp;&amp;amp; and || work for example if(1==2 &amp;amp;&amp;amp; say(&amp;quot;test&amp;quot;)) in the past &amp;quot;test&amp;quot; would get printed since it would resolve both sides before proceeding but now &amp;quot;&amp;quot;test&amp;quot; will not be printed since if the first part fails to match the second is not resolved at all&lt;br /&gt;
* VarDump() and Printr() now display CharPtr information (its address and string content)&lt;br /&gt;
* Added ChunkSplit() works same as PHP version&lt;br /&gt;
* Added SubstrReplace() works similar to PHP version&lt;br /&gt;
* Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)&lt;br /&gt;
* Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this&lt;br /&gt;
* Added IsPunctuation()&lt;br /&gt;
* Added IsBlank()&lt;br /&gt;
* Added IsSeparator()&lt;br /&gt;
* Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.17 @ 08-29-2013 05:49 PM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc&lt;br /&gt;
* Added new example: Perfect World Skill Editor&lt;br /&gt;
* Added new example: Raw Sockets&lt;br /&gt;
* Added new example: Sputnik Sockets&lt;br /&gt;
* Added new example: RPN Calculator&lt;br /&gt;
* Goto is now capable of finding the Label almost anywhere in the script&lt;br /&gt;
* Added GetDosPath()&lt;br /&gt;
* Fixed RegRead()&lt;br /&gt;
* Added RegWrite()&lt;br /&gt;
* Added RegDelete()&lt;br /&gt;
* Added RegKeyList()&lt;br /&gt;
* Added RegValueList()&lt;br /&gt;
* Added RegKeyExists()&lt;br /&gt;
* Added RegValueExists()&lt;br /&gt;
* Added InsertArray()&lt;br /&gt;
* Added VarToObj()&lt;br /&gt;
* Added ObjToVar()&lt;br /&gt;
* Added GUIGetPropList()&lt;br /&gt;
* It is now possible to cast as array using (array)&lt;br /&gt;
* Added new Rule system for functions read about it here &amp;gt;&amp;gt; Function Rules &amp;lt;&amp;lt;&lt;br /&gt;
* Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))&lt;br /&gt;
* Fixed all functions that returns HWND, Pids etc to now use IntPtr&lt;br /&gt;
* Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===&lt;br /&gt;
* Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer&lt;br /&gt;
* Fixed a bug where ] would appear when &amp;quot;Test $var[3] etc&amp;quot; was used in a string the ] would fail to get taken out&lt;br /&gt;
* Fixed a crash when run on windows XP where the console API &amp;quot;GetCurrentConsoleFontEx&amp;quot; does not exist&lt;br /&gt;
* Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly&lt;br /&gt;
* It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless&lt;br /&gt;
* Is IsNot ~~ !~ now correctly work with GUIObjects such as &amp;quot;$var1 ~~ Window&amp;quot; and &amp;quot;$var1 is Button&amp;quot;&lt;br /&gt;
* A bunch of other bug fixes &lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.16 @ 08-25-2013 07:56 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Fixed a lot of bugs&lt;br /&gt;
* Added new data type IntPtr for the $variables&lt;br /&gt;
* Added new data type UIntPtr for the $variables&lt;br /&gt;
* Added/Completed IndexOf( )&lt;br /&gt;
* Added/Completed IndexOfAny( )&lt;br /&gt;
* Added/Completed IndexNotOf( )&lt;br /&gt;
* Added/Completed IndexNotOfAny( )&lt;br /&gt;
* Added/Completed LastIndexOf( )&lt;br /&gt;
* Added/Completed LastIndexOfAny( )&lt;br /&gt;
* Added/Completed LastIndexNotOf( )&lt;br /&gt;
* Added/Completed LastIndexNotOfAny( )&lt;br /&gt;
* Added RevHex()&lt;br /&gt;
* Changed how strings handle arithmetic see language reference with &amp;quot;Strings as Numbers&amp;quot;&lt;br /&gt;
* Changed Remove() to ALSO accept just the array + position to delete one element&lt;br /&gt;
* Changed Shift() and Pop() to return empty string instead of 0 on fail&lt;br /&gt;
* InStr() fixed and improved&lt;br /&gt;
* CSV() improved with more features&lt;br /&gt;
* CountFields() added&lt;br /&gt;
* NthField() added&lt;br /&gt;
* Realloc() added&lt;br /&gt;
* DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()&lt;br /&gt;
* StringBuilder.spk lib file has been improved a lot with new operator overloads etc&lt;br /&gt;
* Documentation for SendKeys() updated and made readable&lt;br /&gt;
* Made classes better and fixed a few potential issues and use slightly less ram&lt;br /&gt;
* Resolved a potential problem which caused strings to get refed instead of copied sometimes&lt;br /&gt;
* Added new example &amp;quot;GUIBuilder&amp;quot; this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them&lt;br /&gt;
* Added new example &amp;quot;BasicGUI&amp;quot; just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that&lt;br /&gt;
* You can use $var-&amp;gt;StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a-&amp;gt;FuncName(10, 20)&lt;br /&gt;
* Some functions start to support the new $var-&amp;gt;FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)&lt;br /&gt;
* Many other things I forgot what&lt;br /&gt;
&lt;br /&gt;
== Sputnik 0.15 @ 08-25-2013 01:15 AM ==&lt;br /&gt;
&lt;br /&gt;
=== Whats New ===&lt;br /&gt;
* Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)&lt;br /&gt;
* UBound() has been modified to now return the index of the highest element in the array (instead of total count)&lt;br /&gt;
* LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)&lt;br /&gt;
* Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)&lt;br /&gt;
* HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).&lt;br /&gt;
* Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);&lt;br /&gt;
* FileDownload.spk is now in the Lib folder this class can be used to easily download files.&lt;br /&gt;
&lt;br /&gt;
== Lower than 0.15 ==&lt;br /&gt;
&lt;br /&gt;
No information available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Version History]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Main_Page"/>
				<updated>2015-09-20T16:55:21Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sputnik Programming Language ==&lt;br /&gt;
&lt;br /&gt;
* [[What is Sputnik|What is Sputnik?]]&lt;br /&gt;
* [[The Team|The Team]]&lt;br /&gt;
* [[Language Reference|Language Reference]]&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
* [[Class Reference|Class Reference]]&lt;br /&gt;
* [[Version History|Version History]]&lt;br /&gt;
&lt;br /&gt;
Warning; Information on the wiki may not always be accurate to current downloadable version of Sputnik.&lt;br /&gt;
&lt;br /&gt;
However effort is taken to keep Sputnik compatible with older versions and any changes to that are for the better good overall.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
&lt;br /&gt;
[http://ubersoft.org/download/Sputnik33.rar Sputnik 0.33]&lt;br /&gt;
&lt;br /&gt;
(Extract download with [http://www.rarlab.com/download.htm WinRAR] 5.0 or higher)&lt;br /&gt;
&lt;br /&gt;
=== Contact ===&lt;br /&gt;
&lt;br /&gt;
UberFoX - Lead Programmer&lt;br /&gt;
&lt;br /&gt;
[mailto:uberfox@hotmail.com uberfox@hotmail.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Intro]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-20T16:07:40Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Static Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two variants they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used a a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
To access the raw memory of a string and physically see its null terminator you must use the Fixed() statement or cast the string as a char* the same as in C here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello World!&amp;quot;;&lt;br /&gt;
// Create a pointer to the strings&lt;br /&gt;
// physical memory and place it in&lt;br /&gt;
// $p&lt;br /&gt;
fixed( $p = $str )&lt;br /&gt;
{&lt;br /&gt;
	// Loop through each character in the string&lt;br /&gt;
	// until the null terminator is hit then stop&lt;br /&gt;
	while( (my $c = (char)*$p++) != @'\0' )&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Character '%c' as decimal '%d' as hex '%x'\n&amp;quot;, $c, $c, $c);&lt;br /&gt;
	}&lt;br /&gt;
	// The fact that it actually stops is proof&lt;br /&gt;
	// the null terminator exists&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Character 'H' as decimal '72' as hex '48'&lt;br /&gt;
// Character 'e' as decimal '101' as hex '65'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character ' ' as decimal '32' as hex '20'&lt;br /&gt;
// Character 'W' as decimal '87' as hex '57'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character 'r' as decimal '114' as hex '72'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'd' as decimal '100' as hex '64'&lt;br /&gt;
// Character '!' as decimal '33' as hex '21'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will be automatically expanded to the size you request all the elements in the gap that it fills in will be empty strings ready for use (As seen in index 98).&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Constant Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support constant variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Const $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE define it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a constant variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// constant variable&lt;br /&gt;
Const $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Const to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Const is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Constants should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Function_Reference</id>
		<title>Function Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Function_Reference"/>
				<updated>2015-09-20T10:55:28Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Other GUI Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Function Reference ==&lt;br /&gt;
&lt;br /&gt;
=== How to create a Function ===&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Core Functions ===&lt;br /&gt;
&lt;br /&gt;
If a link is red (unclickable) the function either doesnt exist yet and is pending creation or it has been created but does not yet have a page/example.&lt;br /&gt;
&lt;br /&gt;
==== Language Features ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Translation|&amp;lt;Expression&amp;gt; =~ tr/searchList/replacementList/flags]] -- Translate characters from one character set to another similar to StrTr() function&lt;br /&gt;
* [[Core Function Regex Match|&amp;lt;Expression&amp;gt; =~ m/pattern/flags]] -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups&lt;br /&gt;
* [[Core Function Regex Replace|&amp;lt;Expression&amp;gt; =~ s/pattern/replacement/flags]] -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups&lt;br /&gt;
* [[Core Function Goto Label|Goto Label; &amp;amp; Label:]] -- Jump to another section of the script&lt;br /&gt;
* [[Core Function List|&amp;lt;Scope&amp;gt; List( &amp;lt;expressions&amp;gt;, .. ) = &amp;lt;array&amp;gt;]] -- Extract some elements from an array into ready to use variables&lt;br /&gt;
* [[Core Function Pointer Read/Write Bracket|$ptr[&amp;lt;index&amp;gt;]:&amp;lt;type&amp;gt; = &amp;lt;value&amp;gt;]] -- Read and Write to memory pointers similar to PTRRead() and PTRWrite() but using [] to simulate like it's an array&lt;br /&gt;
* [[Core Function Array Splicing|Array Splicing]] -- Copy parts out of an array and return them as a new array&lt;br /&gt;
* [[Core Function Function Variables|Function Variables]] -- Dynamically create function source code and place it in a variable and call it from the variable&lt;br /&gt;
&lt;br /&gt;
===== Parser Engine =====&lt;br /&gt;
* [[Core Function Parser Engine|Parser Engine]] -- Parse text and have classes created and returned to you&lt;br /&gt;
* [[Core Function Parser|Parser( &amp;lt;grammar&amp;gt;, &amp;lt;tokenName&amp;gt;, &amp;lt;trimRules&amp;gt; )]] -- Create a new parser&lt;br /&gt;
* [[Core Function Parse|Parse( &amp;lt;parser&amp;gt;, &amp;lt;text&amp;gt; )]] -- Parse text with a parser created with Parser()&lt;br /&gt;
* [[Core Function IsToken|IsToken( &amp;lt;object&amp;gt; )]] -- Check if a given object is a token created from the parser&lt;br /&gt;
* [[Core Function TokenClass|TokenClass( &amp;lt;token&amp;gt; )]] -- Get the class the token is linked to&lt;br /&gt;
&lt;br /&gt;
==== Console Functions ====&lt;br /&gt;
* [[Core Function Print|Echo( )]] -- Alias for [[Core Function Print|Print( )]]&lt;br /&gt;
* [[Core Function Println|Say( )]] -- Alias for [[Core Function Println|Println( )]]&lt;br /&gt;
* [[Core Function Print|Print( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window&lt;br /&gt;
* [[Core Function Println|Println( &amp;lt;expression&amp;gt; )]] -- Prints an expressions string value to the console window and inserts a newline character at the end.&lt;br /&gt;
* [[Core Function Printf|Printf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) &lt;br /&gt;
* [[Core Function VPrintf|VPrintf( &amp;lt;expression&amp;gt;, &amp;lt;expressions&amp;gt;... )]] -- Print a formatted string (similar to the C printf() function) using an array as the parameters &lt;br /&gt;
* [[Core Function PrintfC|PrintfC( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Print a formatted string to the console window&lt;br /&gt;
* [[Core Function Input|Input( &amp;lt;prompt&amp;gt; )]] -- Capture a string typed to console window&lt;br /&gt;
* [[Core Function InputC|InputC( &amp;lt;prompt/flag&amp;gt; )]] -- Capture a char (or info about the char) typed to console window&lt;br /&gt;
* [[Core Function Pause|Pause( &amp;lt;expression&amp;gt; )]] -- Pause the execution of the script on the console window until any key is pressed&lt;br /&gt;
* [[Core Function ConsoleClear|Cls( )]] -- Alias for [[Core Function ConsoleClear|ConsoleClear( )]]&lt;br /&gt;
* [[Core Function ConsoleClear|ConsoleClear( )]] -- Clear all text from the console window&lt;br /&gt;
* [[Core Function ConsoleKeyAvailable|ConsoleKeyAvailable( )]] -- Check if there is a key ready to be read from the console &lt;br /&gt;
* [[Core Function ConsoleCapsLock|ConsoleCapsLock( )]] -- Check if caps lock is down on the console &lt;br /&gt;
* [[Core Function ConsoleSetCursor|ConsoleSetCursor( &amp;lt;posX&amp;gt;, &amp;lt;posY&amp;gt; )]] -- Set the cursor position on the console&lt;br /&gt;
* [[Core Function ConsoleSetBuffer|ConsoleSetBuffer( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console text buffer size&lt;br /&gt;
* [[Core Function ConsoleSetSize|ConsoleSetSize( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Set the console window size&lt;br /&gt;
* [[Core Function ConsoleHide|ConsoleHide( )]] -- Hide the console window&lt;br /&gt;
* [[Core Function ConsoleShow|ConsoleShow( )]] -- Show the console window&lt;br /&gt;
* [[Core Function ConsoleState|ConsoleState( )]] -- Get the console state (Visible, Hidden)&lt;br /&gt;
* [[Core Function ConsoleBeep|ConsoleBeep( &amp;lt;freq&amp;gt;, &amp;lt;duration&amp;gt; )]] -- Plays the sound of a beep of a specified frequency and duration through the console speaker&lt;br /&gt;
* [[Core Function ConsoleSeek|ConsoleSeek( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Set the position of the console cursor&lt;br /&gt;
* [[Core Function ConsoleBackColour|ConsoleBackColour( &amp;lt;colour&amp;gt; )]] -- Set the background (behind text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleForeColour|ConsoleForeColour( &amp;lt;colour&amp;gt; )]] -- Set the foreground (text) colour of the console&lt;br /&gt;
* [[Core Function ConsoleBufferWidth|ConsoleBufferWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer width of the console window&lt;br /&gt;
* [[Core Function ConsoleBufferHeight|ConsoleBufferHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the buffer height of the console window&lt;br /&gt;
* [[Core Function ConsoleWidth|ConsoleWidth( &amp;lt;newval&amp;gt; )]] -- Get or Set the width of the console window&lt;br /&gt;
* [[Core Function ConsoleHeight|ConsoleHeight( &amp;lt;newval&amp;gt; )]] -- Get or Set the height of the console window&lt;br /&gt;
* [[Core Function ConsoleTitle|ConsoleTitle( &amp;lt;newtitle&amp;gt; )]] -- Get or Set the title of the console window&lt;br /&gt;
* [[Core Function ConsoleCursorLeft|ConsoleCursorLeft( &amp;lt;newval&amp;gt; )]] -- Gets or sets the column position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorTop|ConsoleCursorTop( &amp;lt;newval&amp;gt; )]] -- Gets or sets the row position of the cursor within the buffer area&lt;br /&gt;
* [[Core Function ConsoleCursorSize|ConsoleCursorSize( &amp;lt;newval&amp;gt; )]] -- Gets or sets the height of the cursor within a character cell&lt;br /&gt;
* [[Core Function ConsoleCursorVisible|ConsoleCursorVisible( &amp;lt;newval&amp;gt; )]] -- Gets or sets a value indicating whether the cursor is visible&lt;br /&gt;
* [[Core Function CGIConsole|CGIConsole( )]] -- Changes the console printing to work best a CGI instead of stand alone terminal&lt;br /&gt;
&lt;br /&gt;
==== Multi-Threading Functions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ThreadCreate|ThreadCreate( &amp;lt;name&amp;gt;, &amp;lt;function&amp;gt;, &amp;lt;extra&amp;gt; )]] -- Create a new thread and start it off executing a function or some code&lt;br /&gt;
* [[Core Function ThreadSleep|ThreadSleep( &amp;lt;name&amp;gt; )]] -- Freeze a thread and make it sleep&lt;br /&gt;
* [[Core Function ThreadResume|ThreadResume( &amp;lt;name&amp;gt; )]] -- Unfreeze a thread and allow it to continue execution&lt;br /&gt;
* [[Core Function ThreadState|ThreadState( &amp;lt;name&amp;gt; )]] -- Returns state of a thread&lt;br /&gt;
* [[Core Function ThreadKill|ThreadKill( &amp;lt;name&amp;gt; )]] -- Terminate a thread and remove it from the script&lt;br /&gt;
* [[Core Function ThreadExists|ThreadExists( &amp;lt;name&amp;gt; )]] -- Check if a thread exists by this name&lt;br /&gt;
* [[Core Function ThreadName|ThreadName( )]] -- Returns the name of the current thread that is executing this code&lt;br /&gt;
* [[Core Function ThreadLock|ThreadLock( &amp;lt;lockname&amp;gt; ) {}]] -- Locks a given section of code allowing only one thread to execute it at a time&lt;br /&gt;
* [[Core Function Threads|Threads( )]] -- Return an array of all threads&lt;br /&gt;
&lt;br /&gt;
==== Variable Type Conversions ====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function Bool|Bool( &amp;lt;expression&amp;gt; )]] -- Returns the TRUE(1) or FALSE(0) representation of an expression&lt;br /&gt;
* [[Core Function Char|Char( &amp;lt;expression&amp;gt; )]] -- Returns the single letter representation of an expression&lt;br /&gt;
* [[Core Function Byte|Byte( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function SByte|SByte( &amp;lt;expression&amp;gt; )]] -- Returns the signed 8-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Short|Short( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int16|Int16( &amp;lt;expression&amp;gt; )]] -- Returns the signed 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int32|Int32( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int|Int( &amp;lt;expression&amp;gt; )]] -- Returns the signed 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Int64|Int64( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Long|Long( &amp;lt;expression&amp;gt; )]] -- Returns the signed 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UShort|UShort( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt16|UInt16( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 16-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt32|UInt32( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt|UInt( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 32-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function UInt64|UInt64( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function ULong|ULong( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned 64-bit integer (whole number) representation of an expression&lt;br /&gt;
* [[Core Function Ptr|Ptr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function IntPtr|IntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the signed pointer representation of an expression&lt;br /&gt;
* [[Core Function UPtr|UPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function UIntPtr|UIntPtr( &amp;lt;expression&amp;gt; )]] -- Returns the unsigned pointer representation of an expression&lt;br /&gt;
* [[Core Function Float|Float( &amp;lt;expression&amp;gt; )]] -- Returns the 32-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function Double|Double( &amp;lt;expression&amp;gt; )]] -- Returns the 64-bit floating point representation of an expression&lt;br /&gt;
* [[Core Function String|String( &amp;lt;expression&amp;gt; )]] -- Returns the String representation of an expression&lt;br /&gt;
* [[Core Function Ascii|Ascii( &amp;lt;expression&amp;gt; )]] -- Returns the String (In raw ASCII) representation of an expression&lt;br /&gt;
* [[Core Function Binary|Binary( &amp;lt;expression&amp;gt; )]] -- Returns the Binary (raw bytes) representation of an expression&lt;br /&gt;
&lt;br /&gt;
==== Common Variable Functions ====&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function IsSet|IsSet( $variable )]] -- Determine if a variable is set and is not NULL&lt;br /&gt;
* [[Core Function Unset|Unset( $variable )]] -- Delete a variable&lt;br /&gt;
* [[Core Function Ref|Ref( $variable )]] -- Retrieve the variable at the lowest depth in references that the current variable links to&lt;br /&gt;
* [[Core Function IsDeclared|IsDeclared( &amp;lt;variable name&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a variable has been declared&lt;br /&gt;
* [[Core Function Printr|Printr( $variable, &amp;lt;newline&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Prints all details about a variable in a way thats easy for humans to read it (Will print arrays etc)&lt;br /&gt;
* [[Core Function VarDump|VarDump( $variable, &amp;lt;newline&amp;gt; )]] -- Dumps information about a variable&lt;br /&gt;
* [[Core Function Assign|Assign( &amp;lt;varname&amp;gt;, &amp;lt;data&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Assigns a variable by name with the data&lt;br /&gt;
* [[Core Function Atof|Atof( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Double&lt;br /&gt;
* [[Core Function Atoi|Atoi( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int32&lt;br /&gt;
* [[Core Function Atol|Atol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToTol|StrTol( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to Int64&lt;br /&gt;
* [[Core Function StrToToul|StrToul( &amp;lt;variable&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;base&amp;gt;, &amp;lt;start&amp;gt; )]] -- Convert string to UInt64&lt;br /&gt;
* [[Core Function IsNan|IsNan( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is NaN (Not a number)&lt;br /&gt;
* [[Core Function IsInf|IsInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Infinity&lt;br /&gt;
* [[Core Function IsPosInf|IsPosInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Positive-Infinity&lt;br /&gt;
* [[Core Function IsNegInf|IsNegInf( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is Negative-Infinity&lt;br /&gt;
* [[Core Function IsNormal|IsNormal( &amp;lt;variable&amp;gt; )]] -- Check if a floating pointer value is neither NaN, PosInf, NegInf or Inf&lt;br /&gt;
* [[Core Function SignBit|SignBit( &amp;lt;variable&amp;gt; )]] -- Returns whether the sign of a variable is negative&lt;br /&gt;
&lt;br /&gt;
===== Type Checking =====&lt;br /&gt;
&lt;br /&gt;
* [[Core Function isVar|isVar( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Checks if a variable is a type (as a string) or inherits from a type (if not strict) (the same as $a ~~ Type)&lt;br /&gt;
* [[Core Function isVarChar|isVarChar( $variable )]] -- Checks if a variable is a char type&lt;br /&gt;
* [[Core Function isVarBool|isVarBool( $variable )]] -- Checks if a variable is a boolean type&lt;br /&gt;
* [[Core Function isVarByte|isVarByte( $variable )]] -- Checks if a variable is an unsigned 8-bit integer type&lt;br /&gt;
* [[Core Function isVarSByte|isVarSByte( $variable )]] -- Checks if a variable is a signed 8-bit integer type&lt;br /&gt;
* [[Core Function isVarShort|isVarShort( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt16|isVarInt16( $variable )]] -- Checks if a variable is a signed 16-bit integer type&lt;br /&gt;
* [[Core Function isVarInt|isVarInt( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt32|isVarInt32( $variable )]] -- Checks if a variable is a signed 32-bit integer type&lt;br /&gt;
* [[Core Function isVarInt64|isVarInt64( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarLong|isVarLong( $variable )]] -- Checks if a variable is a signed 64-bit integer type&lt;br /&gt;
* [[Core Function isVarUShort|isVarUShort( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt16|isVarUInt16( $variable )]] -- Checks if a variable is an unsigned 16-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt|isVarUInt( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt32|isVarUInt32( $variable )]] -- Checks if a variable is an unsigned 32-bit integer type&lt;br /&gt;
* [[Core Function isVarUInt64|isVarUInt64( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarULong|isVarULong( $variable )]] -- Checks if a variable is an unsigned 64-bit integer type&lt;br /&gt;
* [[Core Function isVarFloat|isVarFloat( $variable )]] -- Checks if a variable is a single precision floating point type&lt;br /&gt;
* [[Core Function isVarFP|isVarFP( $variable )]] -- Checks if a check if a variable type is only a float/double nothing else&lt;br /&gt;
* [[Core Function isVarDouble|isVarDouble( $variable )]] -- Checks if a variable is a double precision floating point type&lt;br /&gt;
* [[Core Function isVarPtr|isVarPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarIntPtr|isVarIntPtr( $variable )]] -- Checks if a variable is an signed pointer type&lt;br /&gt;
* [[Core Function isVarUPtr|isVarUPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarUIntPtr|isVarUIntPtr( $variable )]] -- Checks if a variable is an unsigned pointer type&lt;br /&gt;
* [[Core Function isVarString|isVarString( $variable )]] -- Checks if a variable is a string type&lt;br /&gt;
* [[Core Function isVarNumber|isVarNumber( $variable )]] -- Checks if a variable is any integer or float/double type&lt;br /&gt;
* [[Core Function isVarNull|isVarNull( $variable )]] -- Checks if a variable is null&lt;br /&gt;
* [[Core Function isVarBinary|isVarBinary( $variable )]] -- Checks if a variable is a binary type&lt;br /&gt;
* [[Core Function isVarFunction|isVarFunction( $variable )]] -- Checks if a variable is a function type&lt;br /&gt;
* [[Core Function isVarRef|isVarRef( $variable )]] -- Check if a variable is an reference to another variable&lt;br /&gt;
* [[Core Function isVarArray|isVarArray( $variable )]] -- Check if a variable is an array&lt;br /&gt;
* [[Core Function isVarObj|isVarObj( $variable, &amp;lt;type&amp;gt; )]] -- Check if a variable is an object type (This includes classes, file handles etc)&lt;br /&gt;
* [[Core Function isVarClass|isVarClass( $variable, &amp;lt;type&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Check if a variable's object type is a class&lt;br /&gt;
* [[Core Function isVarDLLStruct|isVarDLLStruct( $variable )]] -- Check if a variable holds a DLLStruct&lt;br /&gt;
* [[Core Function isVarServer|isVarServer( $variable )]] -- Check if a variable holds a Server object from Listen()&lt;br /&gt;
* [[Core Function isVarClient|isVarClient( $variable )]] -- Check if a variable holds a Client object from Connect()&lt;br /&gt;
* [[Core Function isVarClientSocket|isVarClientSocket( $variable )]] -- Check if a variable holds a Client socket object&lt;br /&gt;
* [[Core Function isVarSocket|isVarSocket( $variable )]] -- Check if a variable holds a Socket object&lt;br /&gt;
* [[Core Function isVarSigned|isVarSigned( $variable )]] -- Check if a variable holds a signed integer&lt;br /&gt;
* [[Core Function isVarUnsigned|isVarUnsigned( $variable )]] -- Check if a variable holds an unsigned integer&lt;br /&gt;
&lt;br /&gt;
====== Get Type Directly ======&lt;br /&gt;
* [[Core Function GetVarType|GetVarType( $variable )]] -- Get the common type of a variable&lt;br /&gt;
* [[Core Function GetVarTypeName|GetVarTypeName( $variable )]] -- Get the common type of a variable (as a string)&lt;br /&gt;
* [[Core Function GetVarObjType|GetVarObjType( $variable )]] -- Get the common object type of a variable (If it is an object)&lt;br /&gt;
* [[Core Function GetVarObjTypeName|GetVarObjTypeName( $variable )]] -- Get the common object type of a variable (If it is an object) and return it as string&lt;br /&gt;
&lt;br /&gt;
==== Binary Data Management Functions ====&lt;br /&gt;
* [[Core Function Bin|Bin( &amp;lt;args&amp;gt; )]] -- Create a new binary variable&lt;br /&gt;
* [[Core Function Op|Op( &amp;lt;opCodes&amp;gt; )]] -- Create a new binary variable from a string of opCodes such as &amp;quot;AA 10 20&amp;quot;&lt;br /&gt;
* [[Core Function BinaryCreate|BinaryCreate( &amp;lt;size&amp;gt;, &amp;lt;fill&amp;gt; )]] -- Create a new binary variable and its array size and fill data type &lt;br /&gt;
* [[Core Function BinaryClone|BinaryClone( &amp;lt;binary-array&amp;gt; )]] -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one&lt;br /&gt;
* [[Core Function BinaryContains|BinaryContains( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Check if a binary variable contains a given byte or contains another binary variable&lt;br /&gt;
* [[Core Function BinaryCRC32|BinaryCRC32( &amp;lt;binary-array&amp;gt; )]] -- Calculates the crc32 polynomial of a binary array&lt;br /&gt;
* [[Core Function BinaryWipe|BinaryWipe( &amp;lt;binary-array&amp;gt; )]] -- Wipes a binary variables data 100% and sets the variable to a blank int containing null&lt;br /&gt;
* [[Core Function BinaryFill|BinaryFill( &amp;lt;binary-array&amp;gt;, &amp;lt;fillWith&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Fill a binary variables data (replace all of it or part of it) with a given byte or zero&lt;br /&gt;
* [[Core Function BinaryStr|BinaryStr( &amp;lt;binary-array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Create a Hex string from a binary array&lt;br /&gt;
* [[Core Function BinaryHex|BinaryHex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a binary array from a hex string&lt;br /&gt;
* [[Core Function BinaryLen|BinaryLen( &amp;lt;binary-array&amp;gt;, &amp;lt;newLen&amp;gt; )]] -- Returns the number of bytes in a binary variable (or increase it's capacity for bytes)&lt;br /&gt;
* [[Core Function BinaryGet|BinaryGet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinarySet|BinarySet( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the byte at an index of a binary variable&lt;br /&gt;
* [[Core Function BinaryReverse|BinaryReverse( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Reverse the order bytes a binary variable&lt;br /&gt;
* [[Core Function BinaryRemove|BinaryRemove( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Remove bytes from a binary variable&lt;br /&gt;
* [[Core Function BinaryExpand|BinaryExpand( &amp;lt;binary-array&amp;gt; )]] -- Expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable&lt;br /&gt;
* [[Core Function BinaryStartsWith|BinaryStartsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable starts with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryEndsWith|BinaryEndsWith( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt; )]] -- Check if this binary variable ends with a specific sequence of bytes&lt;br /&gt;
* [[Core Function BinaryIndexOf|BinaryIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryIndexOfAny|BinaryIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryLastIndexOf|BinaryLastIndexOf( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of the needle&lt;br /&gt;
* [[Core Function BinaryLastIndexOfAny|BinaryLastIndexOfAny( &amp;lt;binary-array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the last occurrence of any of the needles&lt;br /&gt;
* [[Core Function BinaryRandom|BinaryRandom( &amp;lt;binary-array&amp;gt;, &amp;lt;seed&amp;gt; )]] -- Randomize all bytes in a binary variable&lt;br /&gt;
* [[Core Function BinaryReplace|BinaryReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;maxReplacements&amp;gt; )]] -- Search for a byte or string of bytes in a binary variable and replace it&lt;br /&gt;
* [[Core Function BinaryHash|BinaryHash( &amp;lt;binary-array&amp;gt; )]] -- Gain a unique Hash of the bytes in this binary variable&lt;br /&gt;
* [[Core Function BinaryMid|BinaryMid( &amp;lt;binary-array&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Create a binary variable by extracting a number of bytes from another binary variable&lt;br /&gt;
* [[Core Function BinaryMidReplace|BinaryMidReplace( &amp;lt;binary-array&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace a section (from start to length) of the binary with the replacement binary&lt;br /&gt;
* [[Core Function BinaryConcat|BinaryConcat( &amp;lt;destination/array&amp;gt;, &amp;lt;values&amp;gt; )]] -- Mass append a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryJoin|BinaryJoin( &amp;lt;separator&amp;gt;, &amp;lt;values&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] -- Create a new Binary by joining together a ton of Binary variables in an extremely fast and efficient way&lt;br /&gt;
* [[Core Function BinaryAppend|BinaryAppend( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Append a binary variables data onto the end or beginning of another binary variables data&lt;br /&gt;
* [[Core Function BinaryInsert|BinaryInsert( &amp;lt;binary-array&amp;gt;, &amp;lt;binary-array2&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;overwrite&amp;gt; )]] -- Insert a binary variables data into another binary variable at a specific location&lt;br /&gt;
* [[Core Function BinaryUnshift|BinaryUnshift( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the beginning of a binary variable&lt;br /&gt;
* [[Core Function BinaryPush|BinaryPush( &amp;lt;binary-array&amp;gt;, &amp;lt;byte&amp;gt; )]] -- Add a byte to the end of a binary variable&lt;br /&gt;
* [[Core Function BinaryShift|BinaryShift( &amp;lt;binary-array&amp;gt; )]] -- Delete the first byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryPop|BinaryPop( &amp;lt;binary-array&amp;gt; )]] -- Delete the last byte from a binary variable&lt;br /&gt;
* [[Core Function BinaryResize|BinaryResize( &amp;lt;binary-array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;data&amp;gt; )]] -- Resize a binary variables data array&lt;br /&gt;
* [[Core Function BinaryPadLeft|BinaryPadLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Left pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinaryPadRight|BinaryPadRight( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt; )]] -- Right pad a binary variable with a number of bytes or pad it to a total number of bytes&lt;br /&gt;
* [[Core Function BinarySHA1|BinarySHA1( &amp;lt;binary-array&amp;gt; )]] -- Returns the SHA1 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryFromStr|BinaryFromStr( &amp;lt;string&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new binary variable created from a strings raw bytes&lt;br /&gt;
* [[Core Function BinaryToStr|BinaryToStr( &amp;lt;binary-array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a new string containing the binary data as raw bytes&lt;br /&gt;
* [[Core Function BinaryMD5|BinaryMD5( &amp;lt;binary-array&amp;gt; )]] -- Returns the MD5 hash of a binary variable&lt;br /&gt;
* [[Core Function BinaryCompare|BinaryCompare( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;needle, &amp;lt;needleOffset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Compare two binary variables&lt;br /&gt;
* [[Core Function BinaryCompress|BinaryCompress( &amp;lt;binary-array&amp;gt; )]] -- Compress a binary variables data&lt;br /&gt;
* [[Core Function BinaryUncompress|BinaryUncompress( &amp;lt;binary-array&amp;gt; )]] -- Uncompress a binary variable data&lt;br /&gt;
* [[Core Function BinaryToLower|BinaryToLower( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to lowercase&lt;br /&gt;
* [[Core Function BinaryToUpper|BinaryToUpper( &amp;lt;binary-array&amp;gt; )]] -- Convert any ASCII characters to uppercase&lt;br /&gt;
* [[Core Function BinaryTrim|BinaryTrim( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left or right&lt;br /&gt;
* [[Core Function BinaryTrimLeft|BinaryTrimLeft( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left&lt;br /&gt;
* [[Core Function BinaryTrimRight|BinaryTrimRight( &amp;lt;binary-array&amp;gt;, &amp;lt;trimBytes&amp;gt; )]] -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the right&lt;br /&gt;
* [[Core Function BinaryStripNull|BinaryStripNull( &amp;lt;binary-array&amp;gt; )]] -- Strip all NULL bytes (0x00) from a binary variable&lt;br /&gt;
* [[Core Function BinaryUUEncode|BinaryUUEncode( &amp;lt;binary-array&amp;gt; )]] -- Encodes a binary variable using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinaryUUDecode|BinaryUUDecode( &amp;lt;binary-array&amp;gt; )]] -- Decodes a binary variable that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function BinarySave|BinarySave( &amp;lt;binary-array&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Save a binary variable data to file&lt;br /&gt;
* [[Core Function BinaryLoad|BinaryLoad( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new binary variable by loading binary data from a file&lt;br /&gt;
&lt;br /&gt;
===== Binary packer/unpacker =====&lt;br /&gt;
* [[Core Function Pack|Pack( &amp;lt;format&amp;gt;, &amp;lt;args&amp;gt; )]] -- Pack data into a binary array&lt;br /&gt;
* [[Core Function Unpack|Unpack( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Unpack data from a binary array&lt;br /&gt;
* [[Core Function PackSingle|PackSingle( &amp;lt;format&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pack a single value into a binary array&lt;br /&gt;
* [[Core Function UnpackSingle|UnpackSingle( &amp;lt;format&amp;gt;, &amp;lt;data/binary-array&amp;gt;, &amp;lt;position&amp;gt; )]] -- Unpack a single value from a binary array optionally from a given index&lt;br /&gt;
&lt;br /&gt;
===== Bit Vector =====&lt;br /&gt;
* [[Core Function Vec|Vec( &amp;lt;binary-array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;bits&amp;gt; )]] -- Treats binary variable as a bit vector made up of elements of width bits and returns the value of the element specified by offset as an unsigned integer and optionally sets bits in the string to a given value&lt;br /&gt;
&lt;br /&gt;
===== Bits =====&lt;br /&gt;
* [[Core Function SetBit|SetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the bit at a given index&lt;br /&gt;
* [[Core Function GetBit|GetBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get the bit at a given index&lt;br /&gt;
* [[Core Function InvertBit|InvertBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Invert the bit at a given index&lt;br /&gt;
* [[Core Function ClearBit|ClearBit( &amp;lt;binary-array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Clear the bit at a given index&lt;br /&gt;
* [[Core Function FillBit|FillBit( &amp;lt;binary-array&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set all bits to the value&lt;br /&gt;
&lt;br /&gt;
===== BinHex 5.0 =====&lt;br /&gt;
* [[Core Function BinHexEncode|BinHexEncode( &amp;lt;name&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;creator&amp;gt;, &amp;lt;resourceFork&amp;gt;, &amp;lt;dataFork&amp;gt;, &amp;lt;flag1&amp;gt;, &amp;lt;flag2&amp;gt; )]] -- Encode data (usually a file) to BinHex 5.0 format&lt;br /&gt;
* [[Core Function BinHexDecode|BinHexDecode( &amp;lt;binhex-binary&amp;gt; )]] -- Decode data (usually a file) from BinHex 5.0 format&lt;br /&gt;
&lt;br /&gt;
===== ByteBuffer =====&lt;br /&gt;
The ByteBuffer is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc it works similar to the ByteBuffer in Java&lt;br /&gt;
* [[Core Function ByteBufferNew|ByteBufferNew( &amp;lt;nothing/capacity/binary/byteBuffer&amp;gt; )]] -- Make a new ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferGet|ByteBufferGet( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get data from a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPut|ByteBufferPut( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;variable&amp;gt; )]] -- Add data to a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPeek|ByteBufferPeek( &amp;lt;byteBuffer&amp;gt;, &amp;lt;type&amp;gt; )]] -- Peek at data from a ByteBuffer (same as get but without moving the position forward)&lt;br /&gt;
* [[Core Function ByteBufferGetBinary|ByteBufferGetBinary( &amp;lt;byteBuffer&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt; )]] -- Get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)&lt;br /&gt;
* [[Core Function ByteBufferCapacity|ByteBufferCapacity( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferRewind|ByteBufferRewind( &amp;lt;byteBuffer&amp;gt; )]] -- Set the position of a ByteBuffer back to the start&lt;br /&gt;
* [[Core Function ByteBufferLimit|ByteBufferLimit( &amp;lt;byteBuffer&amp;gt; )]] -- Get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferPosition|ByteBufferPosition( &amp;lt;byteBuffer&amp;gt;, &amp;lt;newPosition&amp;gt; )]] -- Get and set the position of a ByteBuffer to any value&lt;br /&gt;
* [[Core Function ByteBufferRemaining|ByteBufferRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Get how many bytes are possible to read from current position of a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferHasRemaining|ByteBufferHasRemaining( &amp;lt;byteBuffer&amp;gt; )]] -- Check if its possible to read at least one byte from the ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferClear|ByteBufferClear( &amp;lt;byteBuffer&amp;gt; )]] -- Clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferFlip|ByteBufferFlip( &amp;lt;byteBuffer&amp;gt; )]] -- Flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded&lt;br /&gt;
* [[Core Function ByteBufferMark|ByteBufferMark( &amp;lt;byteBuffer&amp;gt; )]] -- Mark the position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferReset|ByteBufferReset( &amp;lt;byteBuffer&amp;gt; )]] -- Reset the position to the previously marked position in a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferCompare|ByteBufferCompare( &amp;lt;byteBuffer&amp;gt;, &amp;lt;byteBuffer&amp;gt; )]] -- Compare two ByteBuffers to see if they are equal&lt;br /&gt;
* [[Core Function ByteBufferClone|ByteBufferClone( &amp;lt;byteBuffer&amp;gt; )]] -- Clone a ByteBuffer&lt;br /&gt;
* [[Core Function ByteBufferToBinary|ByteBufferToBinary( &amp;lt;byteBuffer&amp;gt; )]] -- Return a new binary variable from the data contained within the ByteBuffer&lt;br /&gt;
&lt;br /&gt;
===== NBT (Named Binary Tag) =====&lt;br /&gt;
Functions on par with Minecrafts NBT system but greatly expanded to include many additional features and improvements specific for Sputnik.&lt;br /&gt;
* [[Core Function NBT|NBT( &amp;lt;value&amp;gt; )]] -- Convert a variable into an accurate NBT representation of it&lt;br /&gt;
* [[Core Function NBTNew|NBTNew( &amp;lt;nbt-type&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Create a new NBT of a given type and optionally give it a name and starting value&lt;br /&gt;
* [[Core Function NBTCompare|NBTCompare( &amp;lt;nbt&amp;gt;, &amp;lt;nbt&amp;gt; )]] -- Compare two NBT variables to see if they contain the same data&lt;br /&gt;
* [[Core Function NBTCopy|NBTCopy( &amp;lt;nbt&amp;gt; )]] -- Make a clone of an NBT&lt;br /&gt;
* [[Core Function NBTGetId|NBTGetId( &amp;lt;nbt&amp;gt; )]] -- Get the ID type of an NBT&lt;br /&gt;
* [[Core Function NBTGetName|NBTGetName( &amp;lt;nbt&amp;gt; )]] -- Get the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTSetName|NBTGetName( &amp;lt;nbt&amp;gt;, &amp;lt;new-name&amp;gt; )]] -- Set the name (tag key) of an NBT&lt;br /&gt;
* [[Core Function NBTHash|NBTHash( &amp;lt;nbt&amp;gt; )]] -- Compute the CRC32 hash of an NBT&lt;br /&gt;
* [[Core Function NBTToString|NBTToString( &amp;lt;nbt&amp;gt; )]] -- Return a string representation of an NBT&lt;br /&gt;
* [[Core Function NBTToVar|NBTToVar( &amp;lt;nbt&amp;gt; )]] -- Return the Sputnik variable representation of an NBT&lt;br /&gt;
* [[Core Function IsVarNBT|IsVarNBT( &amp;lt;value&amp;gt; )]] -- Check if a variable is contains an NBT&lt;br /&gt;
&lt;br /&gt;
====== NBTTagCompound ======&lt;br /&gt;
* [[Core Function NBTCompoundClear|NBTCompoundClear( &amp;lt;nbtCompound&amp;gt; )]] -- Clear all tags&lt;br /&gt;
* [[Core Function NBTCompoundCount|NBTCompoundCount( &amp;lt;nbtCompound&amp;gt; )]] -- Return the amount of tags&lt;br /&gt;
* [[Core Function NBTCompoundGet|NBTCompoundGet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Get a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundSet|NBTCompoundSet( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a tag by name&lt;br /&gt;
* [[Core Function NBTCompoundGetKeys|NBTCompoundGetKeys( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all keys&lt;br /&gt;
* [[Core Function NBTCompoundGetTags|NBTCompoundGetTags( &amp;lt;nbtCompound&amp;gt; )]] -- Get an array of all tags&lt;br /&gt;
* [[Core Function NBTCompoundGetMap|NBTCompoundGetMap( &amp;lt;nbtCompound&amp;gt; )]] -- Get an associative array of all keys and tags&lt;br /&gt;
* [[Core Function NBTCompoundHasKey|NBTCompoundHasKey( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt; )]] -- Check if a given tag exists by name&lt;br /&gt;
* [[Core Function NBTCompoundIsEmpty|NBTCompoundIsEmpty( &amp;lt;nbtCompound&amp;gt; )]] -- Check if there are no tags&lt;br /&gt;
* [[Core Function NBTCompoundRemove|NBTCompoundRemove( &amp;lt;nbtCompound&amp;gt;, &amp;lt;tag&amp;gt;, &amp;lt;value&amp;gt; )]] -- Remove a specific tag by name&lt;br /&gt;
* [[Core Function NBTCompoundWrite|NBTCompoundWrite( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Write the NBTTagCompound to binary or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundRead|NBTCompoundRead( &amp;lt;binary-variable/buffer&amp;gt; )]] -- Create a new NBTTagCompound from a binary array or a buffer&lt;br /&gt;
* [[Core Function NBTCompoundWriteFile|NBTCompoundWriteFile( &amp;lt;nbtCompound&amp;gt;, &amp;lt;file&amp;gt;, &amp;lt;compression )]] -- Write the NBTTagCompound to a file&lt;br /&gt;
* [[Core Function NBTCompoundReadFile|NBTCompoundReadFile( &amp;lt;file&amp;gt; )]] -- Create a new NBTTagCompound from reading a file&lt;br /&gt;
* [[Core Function NBTCompoundCompress|NBTCompoundCompress( &amp;lt;nbtCompound&amp;gt; )]] -- Compress the NBTTagCompound to binary&lt;br /&gt;
* [[Core Function NBTCompoundDecompress|NBTCompoundDecompress( &amp;lt;binary-variable&amp;gt; )]] -- Decompress a NBTTagCompound from binary&lt;br /&gt;
* [[Core Function NBTCompoundWriteCompressed|NBTCompoundWriteCompressed( &amp;lt;nbtCompound&amp;gt;, &amp;lt;buffer&amp;gt; )]] -- Compress the NBTTagCompound and write it to a buffer&lt;br /&gt;
* [[Core Function NBTCompoundReadCompressed|NBTCompoundReadCompressed( &amp;lt;buffer&amp;gt; )]] -- Decompress a NBTTagCompound from a buffer&lt;br /&gt;
&lt;br /&gt;
====== NBTTagList/NBTTagListEx ======&lt;br /&gt;
* [[Core Function NBTListAppend|NBTListAppend( &amp;lt;nbtList&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add an NBT to the end of the list&lt;br /&gt;
* [[Core Function NBTListCount|NBTListCount( &amp;lt;nbtList&amp;gt; )]] -- Return how many tags exist in the list&lt;br /&gt;
* [[Core Function NBTListGet|NBTListGet( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Get a tag at the given index&lt;br /&gt;
* [[Core Function NBTListHasId|NBTListHasId( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an index is valid and contains a tag&lt;br /&gt;
* [[Core Function NBTListRemove|NBTListRemove( &amp;lt;nbtList&amp;gt;, &amp;lt;index&amp;gt; )]] -- Remove the tag at the given index&lt;br /&gt;
&lt;br /&gt;
===== Misc Binary Functions =====&lt;br /&gt;
* [[Core Function TB|TB( &amp;lt;string&amp;gt; )]] -- Convert a string of up to 4 chars into a 32-Bit unsigned number (network order)&lt;br /&gt;
* [[Core Function BT|BT( &amp;lt;number&amp;gt; )]] -- Convert a 32-Bit unsigned number (network order) into a string&lt;br /&gt;
&lt;br /&gt;
==== Bit Flag Functions ====&lt;br /&gt;
* [[Core Function HasFlag|HasFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt; )]] -- Check if a flag (or array of flags) is enabled in a given enum instance&lt;br /&gt;
* [[Core Function HasFlagAny|HasFlagAny( &amp;lt;enumInst&amp;gt;, &amp;lt;flags&amp;gt;... )]] -- Check if any flag is enabled in a given enum instance&lt;br /&gt;
* [[Core Function SetFlag|SetFlag( &amp;lt;enumInst&amp;gt;, &amp;lt;flag/flags&amp;gt;, &amp;lt;state&amp;gt; )]] -- Enable or Disable a flag (or array of flags) in a given enum instance&lt;br /&gt;
&lt;br /&gt;
==== Math Functions ====&lt;br /&gt;
* [[Core Function Abs|Abs( &amp;lt;expression&amp;gt; )]] -- Calculates the absolute value of a number&lt;br /&gt;
* [[Core Function ACos|ACos( &amp;lt;expression&amp;gt; )]] -- Calculates the arcCosine of a number&lt;br /&gt;
* [[Core Function ASin|ASin( &amp;lt;expression&amp;gt; )]] -- Calculates the arcsine of a number&lt;br /&gt;
* [[Core Function ATan|ATan( &amp;lt;expression&amp;gt; )]] -- Calculates the arctangent of a number&lt;br /&gt;
* [[Core Function ATan2|ATan2( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Compute arc tangent with two parameters&lt;br /&gt;
* [[Core Function Angle2D|Angle2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Calculates the angle of a line defined by two points on a 2D surface&lt;br /&gt;
* [[Core Function Barycentric|Barycentric( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;amount1&amp;gt;, &amp;lt;amount2&amp;gt; )]] -- Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates&lt;br /&gt;
* [[Core Function CatmullRom|CatmullRom( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;value3&amp;gt;, &amp;lt;value4&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Catmull-Rom interpolation using the specified positions&lt;br /&gt;
* [[Core Function BaseConv|BaseConv( &amp;lt;number&amp;gt;, &amp;lt;frombase&amp;gt;, &amp;lt;tobase&amp;gt; )]] -- Convert a number between arbitrary bases&lt;br /&gt;
* [[Core Function BitAND|BitAND( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise AND operation&lt;br /&gt;
* [[Core Function BitNOT|BitNOT( &amp;lt;expression&amp;gt; )]] -- Performs a bitwise NOT operation&lt;br /&gt;
* [[Core Function BitOR|BitOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise OR operation&lt;br /&gt;
* [[Core Function BitSHIFT|BitSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a bit shifting operation&lt;br /&gt;
* [[Core Function BitTripleSHIFT|BitTripleSHIFT( &amp;lt;value&amp;gt;, &amp;lt;shift&amp;gt; )]] -- Performs a triple bit shifting operation&lt;br /&gt;
* [[Core Function BitXOR|BitXOR( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;n&amp;gt; )]] -- Performs a bitwise exclusive OR (XOR) operation&lt;br /&gt;
* [[Core Function BitROTATE|BitROTATE( &amp;lt;expression&amp;gt;, &amp;lt;shift&amp;gt;, &amp;lt;size&amp;gt; )]] -- Performs a bit shifting operation, with rotation&lt;br /&gt;
* [[Core Function BitSwap|BitSwap( &amp;lt;expression&amp;gt; )]] -- Byte-swap (little-endian &amp;lt;-&amp;gt; big-endian)&lt;br /&gt;
* [[Core Function Ceiling|Ceiling( &amp;lt;expression&amp;gt; )]] -- Returns a number rounded up to the next integer&lt;br /&gt;
* [[Core Function Clamp|Clamp( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Clamps the specified value&lt;br /&gt;
* [[Core Function Cos|Cos( &amp;lt;expression&amp;gt; )]] -- Calculates the cosine of a number&lt;br /&gt;
* [[Core Function Cosh|Cosh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic cosine of the specified angle&lt;br /&gt;
* [[Core Function DegreesToRadians|DegreesToRadians( &amp;lt;value&amp;gt; )]] -- Converts degrees to radians&lt;br /&gt;
* [[Core Function DegreesToRevolutions|DegreesToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts degrees to revolutions&lt;br /&gt;
* [[Core Function DiffCalc|DiffCalc( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;isDouble&amp;gt; )]] -- Calculates the difference between two values and returns information about it that can help you convert the first into the second for future needs&lt;br /&gt;
* [[Core Function Distance|Distance( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt; )]] -- Calculates the absolute value of the difference of two values&lt;br /&gt;
* [[Core Function Distance2D|Distance2D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt; )]] -- Finds the distance between two points on a 2D surface&lt;br /&gt;
* [[Core Function Distance3D|Distance3D( &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;z1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;z2&amp;gt; )]] -- Finds the distance between two points on a 3D surface&lt;br /&gt;
* [[Core Function Exp|Exp( &amp;lt;expression&amp;gt; )]] -- Returns e raised to the specified power&lt;br /&gt;
* [[Core Function Floor|Floor( &amp;lt;expression&amp;gt; )]] -- Returns the largest integer less than or equal to the specified number&lt;br /&gt;
* [[Core Function frexp|frexp( &amp;lt;x&amp;gt; )]] -- Returns m and e such that x = m2e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero)&lt;br /&gt;
* [[Core Function Gauss|Gauss( &amp;lt;amplitude&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;radX&amp;gt;, &amp;lt;radY&amp;gt;, &amp;lt;sigmaX&amp;gt;, &amp;lt;sigmaY&amp;gt; )]] -- Get the result of the Gaussian function&lt;br /&gt;
* [[Core Function GradiansToRevolutions|GradiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts gradians to revolutions&lt;br /&gt;
* [[Core Function GradiansToDegrees|GradiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts gradians to degrees&lt;br /&gt;
* [[Core Function GradiansToRadians|GradiansToRadians( &amp;lt;value&amp;gt; )]] -- Converts gradians to radians&lt;br /&gt;
* [[Core Function Hermite|Hermite( &amp;lt;value1&amp;gt;, &amp;lt;tangent1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;tangent2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Performs a Hermite spline interpolation&lt;br /&gt;
* [[Core Function IsDivisible|IsDivisible( &amp;lt;expression&amp;gt;, &amp;lt;divisor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if an expression is divisible by a given divisor optionally comparing as double/int64&lt;br /&gt;
* [[Core Function IsOdd|IsOdd( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an odd number&lt;br /&gt;
* [[Core Function IsEven|IsEven( &amp;lt;expression&amp;gt; )]] -- Check if an expression is an even number&lt;br /&gt;
* [[Core Function IntToRom|IntToRom( &amp;lt;expression&amp;gt; )]] -- Returns the roman numerical value of an integer&lt;br /&gt;
* [[Core Function ldexp|ldexp( &amp;lt;m&amp;gt;, &amp;lt;n&amp;gt; )]] -- Returns the value of m * 2^n&lt;br /&gt;
* [[Core Function Lerp|Lerp( &amp;lt;from&amp;gt;, &amp;lt;to&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a linear function by a given amount&lt;br /&gt;
* [[Core Function Log|Log( &amp;lt;expression&amp;gt;, &amp;lt;newbase&amp;gt; )]] -- Returns the logarithm of a specified number&lt;br /&gt;
* [[Core Function Log10|Log10( &amp;lt;expression&amp;gt; )]] -- Returns the common (base-10) logarithm of a specified number&lt;br /&gt;
* [[Core Function Math|Math( &amp;lt;expression&amp;gt; )]] -- Parse a string containing mathematical equations&lt;br /&gt;
* [[Core Function Max|Max( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the greater number and return it&lt;br /&gt;
* [[Core Function Min|Min( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Find the lesser number and return it&lt;br /&gt;
* [[Core Function Mod|Mod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the modulus operation&lt;br /&gt;
* [[Core Function Modf|Modf( &amp;lt;x&amp;gt;, &amp;lt;intpart&amp;gt; )]] -- Breaks x into an integral and a fractional part&lt;br /&gt;
* [[Core Function Mod2PI|Mod2PI( &amp;lt;value&amp;gt; )]] -- Calculates the modulo 2*PI of the specified value&lt;br /&gt;
* [[Core Function MatlabMod|MatlabMod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Performs the Matlab modulus operation&lt;br /&gt;
* [[Core Function OffsetCalc|OffsetCalc( &amp;lt;size&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Calculate the START and LENGTH of an array index&lt;br /&gt;
* [[Core Function Pow|Pow( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Returns a specified number raised to the specified power&lt;br /&gt;
* [[Core Function RadiansToDegrees|RadiansToDegrees( &amp;lt;value&amp;gt; )]] -- Converts radians to degrees&lt;br /&gt;
* [[Core Function RadiansToRevolutions|RadiansToRevolutions( &amp;lt;value&amp;gt; )]] -- Converts radians to revolutions&lt;br /&gt;
* [[Core Function RadiansToGradians|RadiansToGradians( &amp;lt;value&amp;gt; )]] -- Converts radians to gradians&lt;br /&gt;
* [[Core Function Random|Random( &amp;lt;minValue&amp;gt;, &amp;lt;maxValue&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get a random number from the defined area&lt;br /&gt;
* [[Core Function RandomVar|RandomVar( &amp;lt;seed&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Generator a random number&lt;br /&gt;
* [[Core Function RandomSeed|RandomSeed( &amp;lt;flag&amp;gt;, &amp;lt;size&amp;gt; )]] -- Generator a cryptographically strong random number for use as a seed&lt;br /&gt;
* [[Core Function RandomSeedSet|RandomSeedSet( &amp;lt;seed&amp;gt; )]] -- Set the seed of Sputniks random number generator&lt;br /&gt;
* [[Core Function RevolutionsToDegrees|RevolutionsToDegrees( &amp;lt;value&amp;gt; )]] -- Converts revolutions to degrees.&lt;br /&gt;
* [[Core Function RevolutionsToRadians|RevolutionsToRadians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to radians.&lt;br /&gt;
* [[Core Function RevolutionsToGradians|RevolutionsToGradians( &amp;lt;value&amp;gt; )]] -- Converts revolutions to gradians.&lt;br /&gt;
* [[Core Function Round|Round( &amp;lt;expression&amp;gt;, &amp;lt;decimalplaces&amp;gt; )]] -- Returns a number rounded to a specified number of decimal places&lt;br /&gt;
* [[Core Function RomToInt|RomToInt( &amp;lt;expression&amp;gt; )]] -- Returns the integer value of a roman numerical sequence&lt;br /&gt;
* [[Core Function Sin|Sin( &amp;lt;expression&amp;gt; )]] -- Returns the sine of the specified angle&lt;br /&gt;
* [[Core Function Sinh|Sinh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic sine of the specified angle&lt;br /&gt;
* [[Core Function SmoothStep|SmoothStep( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;amount&amp;gt; )]] -- Interpolates between two values using a cubic equation&lt;br /&gt;
* [[Core Function Sqrt|Sqrt( &amp;lt;expression&amp;gt; )]] -- Returns the square root of a specified number&lt;br /&gt;
* [[Core Function Sum|Sum( &amp;lt;expressions&amp;gt; )]] -- Returns the sum of all the parameters&lt;br /&gt;
* [[Core Function Tan|Tan( &amp;lt;expression&amp;gt; )]] -- Returns the tangent of the specified angle&lt;br /&gt;
* [[Core Function Tanh|Tanh( &amp;lt;expression&amp;gt; )]] -- Returns the hyperbolic tangent of the specified angle&lt;br /&gt;
* [[Core Function Truncate|Truncate( &amp;lt;expression&amp;gt; )]] -- Calculates the integral part of a specified decimal number&lt;br /&gt;
* [[Core Function WithinEpsilson|WithinEpsilson( &amp;lt;value1&amp;gt;, &amp;lt;value2&amp;gt;, &amp;lt;epsilon&amp;gt; )]] -- Checks if value1 - value2 are almost equals within a float epsilon.&lt;br /&gt;
* [[Core Function Wrap|Wrap( &amp;lt;value&amp;gt;, &amp;lt;min&amp;gt;, &amp;lt;max&amp;gt; )]] -- Wraps the specified value into a range&lt;br /&gt;
* [[Core Function WrapAngle|WrapAngle( &amp;lt;value&amp;gt; )]] -- Reduces a given angle to a value between π and -π.&lt;br /&gt;
* [[Core Function IsPrime|IsPrime( &amp;lt;expression&amp;gt; )]] -- Check if a number is a Prime number&lt;br /&gt;
&lt;br /&gt;
==== String Functions ====&lt;br /&gt;
* [[Core Function AddCSlashes|AddCSlashes( &amp;lt;str&amp;gt;, &amp;lt;charlist&amp;gt; )]] -- Escape a string with slashes in a C style&lt;br /&gt;
* [[Core Function AddBR|AddBR( &amp;lt;str&amp;gt; )]] -- Add HTML breaks to strings at newlines&lt;br /&gt;
* [[Core Function Asc|Asc( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function AscW|AscW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function AscArray|AscArray( &amp;lt;char&amp;gt; )]] -- Returns an array of ASCII characters of a string&lt;br /&gt;
* [[Core Function AscWArray|AscWArray( &amp;lt;char&amp;gt; )]] -- Returns an array of UNICODE characters of a string&lt;br /&gt;
* [[Core Function Between|Between( &amp;lt;haystack&amp;gt;, &amp;lt;firstneedle&amp;gt;, &amp;lt;secondneedle&amp;gt;, &amp;lt;case&amp;gt; )]] -- Return the text between a start and end substring&lt;br /&gt;
* [[Core Function BCrypt|BCrypt( &amp;lt;expression&amp;gt;, &amp;lt;rounds&amp;gt; )]] -- Hash a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function BCryptVerify|BCryptVerify( &amp;lt;expression&amp;gt;, &amp;lt;hash&amp;gt; )]] -- Verify a hash to a string (usually password) with BCrypt.&lt;br /&gt;
* [[Core Function CSetMatch|CSetMatch( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Check if a string contains only characters from a substring(charset)&lt;br /&gt;
* [[Core Function CSetDel|CSetDel( &amp;lt;expression&amp;gt;, &amp;lt;charset&amp;gt;, &amp;lt;case&amp;gt; )]] -- Delete all characters found in the charset from a string&lt;br /&gt;
* [[Core Function ChunkSplit|ChunkSplit( &amp;lt;body&amp;gt;, &amp;lt;chunklen&amp;gt;, &amp;lt;end&amp;gt; )]] -- Split a string into smaller chunks&lt;br /&gt;
* [[Core Function Chop|Chop( &amp;lt;variable&amp;gt; )]] -- Removes and returns the last character from a string&lt;br /&gt;
* [[Core Function Chomp|Chomp( &amp;lt;variable&amp;gt; )]] -- Removes trailing newlines and returns the number of characters removed&lt;br /&gt;
* [[Core Function CountChars|CountChars( &amp;lt;string&amp;gt; )]] -- Return information about characters used in a string&lt;br /&gt;
* [[Core Function CountWords|CountWords( &amp;lt;string&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;charlist&amp;gt;, &amp;lt;outputArray&amp;gt; )]] -- Return information about words used in a string&lt;br /&gt;
* [[Core Function Chr|Chr( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an ASCII code&lt;br /&gt;
* [[Core Function ChrW|ChrW( &amp;lt;expression&amp;gt; )]] -- Returns a character corresponding to an UNICODE code&lt;br /&gt;
* [[Core Function ChrArray|ChrArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array ASCII codes&lt;br /&gt;
* [[Core Function ChrWArray|ChrWArray( &amp;lt;expression&amp;gt; )]] -- Returns a string corresponding to an array UNICODE codes&lt;br /&gt;
* [[Core Function CRC32|CRC32( &amp;lt;string&amp;gt; )]] -- Calculates the crc32 polynomial of a string&lt;br /&gt;
* [[Core Function Crypt|Crypt( &amp;lt;string&amp;gt;, &amp;lt;salt&amp;gt; )]] -- One-way string hashing&lt;br /&gt;
* [[Core Function Contains|Contains( &amp;lt;srting&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains a sub string&lt;br /&gt;
* [[Core Function ContainsAny|ContainsAny( &amp;lt;srting&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;casesense&amp;gt;)]] -- Check if string contains any of the given strings from an array&lt;br /&gt;
* [[Core Function CountFields|CountFields( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns the number of values (fields) in the string passed that are separated by the separator string passed&lt;br /&gt;
* [[Core Function CSV|CSV( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Split strings and parse a CSV text into an array&lt;br /&gt;
* [[Core Function DecOct|DecOct( &amp;lt;expression&amp;gt; )]] -- Decimal to octal&lt;br /&gt;
* [[Core Function Dec|Dec( &amp;lt;expression&amp;gt; )]] -- Returns a integer representation of a hexadecimal string&lt;br /&gt;
* [[Core Function FDec|FDec( &amp;lt;expression&amp;gt; )]] -- Returns a float representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DDec|DDec( &amp;lt;expression&amp;gt; )]] -- Returns a double representation of a hexadecimal string&lt;br /&gt;
* [[Core Function DecPad|DecPad( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pads numeric string to a given number of chars (Filling in the gap with zeros)&lt;br /&gt;
* [[Core Function DecryptString|DecryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Decrypt a string with a given password&lt;br /&gt;
* [[Core Function Decode64|Decode64( &amp;lt;expression&amp;gt;, &amp;lt;strict&amp;gt; )]] -- Decodes string with MIME base64&lt;br /&gt;
* [[Core Function Encode64|Encode64( &amp;lt;expression&amp;gt; )]] -- Encodes string with MIME base64&lt;br /&gt;
* [[Core Function Escape|Escape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to a string&lt;br /&gt;
* [[Core Function EscapeMeta|EscapeMeta( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Add escapes to meta characters&lt;br /&gt;
* [[Core Function EscapeShellArg|EscapeShellArg( &amp;lt;arg&amp;gt; )]] -- Escape a string to be used as a shell argument&lt;br /&gt;
* [[Core Function EscapeShellCmd|EscapeShellCmd( &amp;lt;command&amp;gt; )]] -- Escape shell metacharacters&lt;br /&gt;
* [[Core Function EncryptString|EncryptString( &amp;lt;expression&amp;gt;, &amp;lt;password&amp;gt; )]] -- Encrypt a string with a given password&lt;br /&gt;
* [[Core Function EndsWith|EndsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string ends with a substring&lt;br /&gt;
* [[Core Function Hash|Hash( &amp;lt;expression&amp;gt; )]] -- Generate a unique hash code for a string value&lt;br /&gt;
* [[Core Function Hebrev|Hebrev( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text&lt;br /&gt;
* [[Core Function Hebrevc|Hebrevc( &amp;lt;hebrew_text&amp;gt;, &amp;lt;max_chars_per_line&amp;gt; )]] -- Convert logical Hebrew text to visual text with newline conversion&lt;br /&gt;
* [[Core Function Hex2Str|Hex2Str( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a hex string back to a normal string&lt;br /&gt;
* [[Core Function Hex|Hex( &amp;lt;expression&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns a string representation of an integer type converted to hexadecimal&lt;br /&gt;
* [[Core Function HTMLTranslationTable|HTMLTranslationTable( &amp;lt;the_table&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt; )]] -- Returns the translation table used by HTMLSpecialChars() and HTMLEntities()&lt;br /&gt;
* [[Core Function HTMLEntities|HTMLEntities( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all applicable characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLEntityDecode|HTMLEntityDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert all HTML entities to their applicable characters&lt;br /&gt;
* [[Core Function HTMLSpecialChars|HTMLSpecialChars( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )]] -- Convert special characters to HTML entities&lt;br /&gt;
* [[Core Function HTMLSpecialCharsDecode|HTMLSpecialCharsDecode( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Convert special HTML entities back to characters &lt;br /&gt;
* [[Core Function HTTPMakeQuery|HTTPMakeQuery( &amp;lt;array&amp;gt; )]] -- Converts an array into a properly formatted HTTP query string for use with requests etc&lt;br /&gt;
* [[Core Function HTTPParseQuery|HTTPParseQuery( &amp;lt;string&amp;gt; )]] -- Parse an HTTP query string into an array&lt;br /&gt;
* [[Core Function Fmt|Fmt( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a formatted string&lt;br /&gt;
* [[Core Function FmtNumber|FmtNumber( &amp;lt;number&amp;gt;, &amp;lt;decimals&amp;gt;, &amp;lt;dec_point&amp;gt;, &amp;lt;thousands_sep&amp;gt; )]] -- Format a number with grouped thousands&lt;br /&gt;
* [[Core Function FHex|FHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an float type converted to hexadecimal&lt;br /&gt;
* [[Core Function DHex|DHex( &amp;lt;expression&amp;gt; )]] -- Returns a string representation of an double type converted to hexadecimal&lt;br /&gt;
* [[Core Function Find|Find( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;plain&amp;gt; )]] -- Search for a match in a string and return the match with its found position and length&lt;br /&gt;
* [[Core Function GMatch|GMatch( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;asKeypair&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Extract the patterns from a string and return as array or associative array&lt;br /&gt;
* [[Core Function GSub|GSub( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;repl&amp;gt;, &amp;lt;max&amp;gt; )]] -- Returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function)&lt;br /&gt;
* [[Core Function InStr|InStr( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Checks if a string contains a given substring&lt;br /&gt;
* [[Core Function InStrRev|InStrRev( &amp;lt;string&amp;gt;, &amp;lt;substirng&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;occurrence&amp;gt;, &amp;lt;start&amp;gt; )]] -- Same as InStr() but searches from right to left instead of left to right&lt;br /&gt;
* [[Core Function isAlpha|isAlpha( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only Alphabetic characters&lt;br /&gt;
* [[Core Function isAlphaNumeric|isAlphaNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters&lt;br /&gt;
* [[Core Function isASCII|isASCII( &amp;lt;expression&amp;gt; )]] -- Check if string contains only ASCII chars&lt;br /&gt;
* [[Core Function isControl|isControl( &amp;lt;expression&amp;gt; )]] -- Check if string contains only control chars&lt;br /&gt;
* [[Core Function isEmpty|isEmpty( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty&lt;br /&gt;
* [[Core Function isEmptyOrNull|isEmptyOrNull( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely empty or if the variable is null or if the variable translates to false (zero)&lt;br /&gt;
* [[Core Function IsGraph|IsGraph( &amp;lt;expression&amp;gt; )]] -- Checks if a string is completely only characters that have a graphical representation&lt;br /&gt;
* [[Core Function isDigit|isDigit( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers&lt;br /&gt;
* [[Core Function isFloat|isFloat( &amp;lt;expression&amp;gt; )]] -- Check if string contains a floating point and could be converted&lt;br /&gt;
* [[Core Function isLower|isLower( &amp;lt;expression&amp;gt; )]] -- Checks if string contains only lowercase letters&lt;br /&gt;
* [[Core Function isNumeric|isNumeric( &amp;lt;expression&amp;gt; )]] -- Checks if string only contains numbers (Allows for float/double)&lt;br /&gt;
* [[Core Function isSpace|isSpace( &amp;lt;expression&amp;gt; )]] -- Check if string contains only whitespace&lt;br /&gt;
* [[Core Function isSymbol|isSymbol( &amp;lt;expression&amp;gt; )]] -- Check if string contains only symbol chars&lt;br /&gt;
* [[Core Function IsPunctuation|IsPunctuation( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a punctuation marks&lt;br /&gt;
* [[Core Function IsSeparator|IsSeparator( &amp;lt;expression&amp;gt; )]] -- Check if string contains only characters categorized as a separator character&lt;br /&gt;
* [[Core Function IsBlank|IsBlank( &amp;lt;expression&amp;gt; )]] -- Check if string contains only spaces and tabs&lt;br /&gt;
* [[Core Function isString|isString( &amp;lt;expression&amp;gt; )]] -- Check if variable contains only string chars&lt;br /&gt;
* [[Core Function isUpper|isUpper( &amp;lt;expression&amp;gt; )]] -- Check if string contains only uppercase chars&lt;br /&gt;
* [[Core Function isXDigit|isXDigit( &amp;lt;expression&amp;gt; )]] -- Check if string contains only hex chars&lt;br /&gt;
* [[Core Function IndexOf|IndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of the specified string in a string&lt;br /&gt;
* [[Core Function IndexOfAny|IndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function IndexNotOf|IndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function IndexNotOfAny|IndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the first none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexOf|LastIndexOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexOfAny|LastIndexOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function LastIndexNotOf|LastIndexNotOf( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of the specified string in the current string&lt;br /&gt;
* [[Core Function LastIndexNotOfAny|LastIndexNotOfAny( &amp;lt;expression&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;pos&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;count&amp;gt; )]] -- Reports the index of the last none occurrence of any characters or array of strings in a specified string&lt;br /&gt;
* [[Core Function JsonEncode|JsonEncode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Returns the JSON representation of a value&lt;br /&gt;
* [[Core Function JsonDecode|JsonDecode( &amp;lt;value&amp;gt;, &amp;lt;options&amp;gt; )]] -- Decodes a JSON string&lt;br /&gt;
* [[Core Function Levenshtein|Levenshtein( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;cost_ins&amp;gt;, &amp;lt;cost_rep&amp;gt;, &amp;lt;cost_de&amp;gt; )]] -- Calculate Levenshtein distance between two strings&lt;br /&gt;
* [[Core Function LC|LC( &amp;lt;expression&amp;gt; )]] -- Returns string in all lower case&lt;br /&gt;
* [[Core Function LCFirst|LCFirst( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of string&lt;br /&gt;
* [[Core Function LCLast|LCLast( &amp;lt;expression&amp;gt; )]] -- Lower Cases last letter of string&lt;br /&gt;
* [[Core Function LCWords|LCWords( &amp;lt;expression&amp;gt; )]] -- Lower Cases first letter of each word in string&lt;br /&gt;
* [[Core Function Left|Left( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the left-hand side of a string&lt;br /&gt;
* [[Core Function Lines|Lines( &amp;lt;expression&amp;gt; )]] -- Returns an array containing all the lines from a string&lt;br /&gt;
* [[Core Function Match|Match( &amp;lt;string&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Search for the first match of pattern in a string if found return the captures from the pattern&lt;br /&gt;
* [[Core Function Metaphone|Metaphone( &amp;lt;string&amp;gt;, &amp;lt;phonemes&amp;gt; )]] -- Calculate the metaphone key of a string&lt;br /&gt;
* [[Core Function MD5|MD5( &amp;lt;expression&amp;gt; )]] -- Creates MD5 Hash of specified string&lt;br /&gt;
* [[Core Function NthField|NthField( &amp;lt;string&amp;gt;, &amp;lt;delim&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;quote&amp;gt;, &amp;lt;quoteescape&amp;gt;, &amp;lt;comment&amp;gt;, &amp;lt;trimtype&amp;gt; )]] -- Returns a field from a row of data (such as comma separated text)&lt;br /&gt;
* [[Core Function Ord|Ord( &amp;lt;char&amp;gt; )]] -- Returns the ASCII code of a character&lt;br /&gt;
* [[Core Function OrdW|OrdW( &amp;lt;char&amp;gt; )]] -- Returns the UNICODE code of a character&lt;br /&gt;
* [[Core Function Oct|Oct( &amp;lt;string&amp;gt; )]] -- Converts an octal string into the numerical corresponding value&lt;br /&gt;
* [[Core Function PadLeft|PadLeft( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the left of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PadRight|PadRight( &amp;lt;expression&amp;gt;, &amp;lt;pad&amp;gt;, &amp;lt;count&amp;gt; )]] -- Pad the right of a string a given number of times with another string&lt;br /&gt;
* [[Core Function PrintableEncode|PrintableEncode( &amp;lt;string )]] -- Convert a quoted-printable string to an 8 bit string&lt;br /&gt;
* [[Core Function PrintableDecode|PrintableDecode( &amp;lt;string )]] -- Convert a 8 bit string to a quoted-printable string&lt;br /&gt;
* [[Core Function RandStr|RandStr( &amp;lt;count&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Generate a random sequence of characters at a given length&lt;br /&gt;
* [[Core Function RegexMatch|RegexMatch( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;matches&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression match&lt;br /&gt;
* [[Core Function RegexReplace|RegexReplace( &amp;lt;expression&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;limit&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Perform a regular expression search and replace&lt;br /&gt;
* [[Core Function RegexEscape|RegexEscape( &amp;lt;expression&amp;gt;, &amp;lt;delimiter&amp;gt; )]] -- Escape regular expression characters&lt;br /&gt;
* [[Core Function RegexUnescape|RegexUnescape( &amp;lt;expression&amp;gt; )]] -- Remove any escapes regular expression characters&lt;br /&gt;
* [[Core Function ResolveStr|ResolveStr( &amp;lt;expression&amp;gt;, &amp;lt;allowEscapes&amp;gt;, &amp;lt;allowVariables&amp;gt;, &amp;lt;allowCode&amp;gt; )]] -- Treat a given string as if it was a Sputnik &amp;quot;string&amp;quot; and parse all stuff inside it such as $variables etc&lt;br /&gt;
* [[Core Function Repeat|Repeat( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create a new string or new array containing repeats of a string provided&lt;br /&gt;
* [[Core Function Replace|Replace( &amp;lt;expression&amp;gt;, &amp;lt;find&amp;gt;, &amp;lt;replace&amp;gt;, &amp;lt;case-sensitive-flag&amp;gt; )]] -- Replace substrings within a string with other strings&lt;br /&gt;
* [[Core Function Reverse|Reverse( &amp;lt;expression&amp;gt; )]] -- Reverse all characters in a string&lt;br /&gt;
* [[Core Function RevHex|RevHex( &amp;lt;expression&amp;gt; )]] -- Reverse a string of hex digits&lt;br /&gt;
* [[Core Function Right|Right( &amp;lt;expression&amp;gt;, &amp;lt;count&amp;gt; )]] -- Returns a number of characters from the right-hand side of a string&lt;br /&gt;
* [[Core Function Rot13|Rot13( &amp;lt;str&amp;gt; )]] -- Perform the rot13 transform on a string&lt;br /&gt;
* [[Core Function Scanf|Scanf( &amp;lt;expression&amp;gt;, &amp;lt;def&amp;gt; )]] -- Parses input from a string according to a format&lt;br /&gt;
* [[Core Function SHA1|SHA1( &amp;lt;expression&amp;gt; )]] -- Returns SHA1 hash of string&lt;br /&gt;
* [[Core Function Serialize|Serialize( &amp;lt;variable&amp;gt; )]] -- Convert a variable, array, class etc a string you can save to file or transfer over the internet&lt;br /&gt;
* [[Core Function SimilarText|SimilarText( &amp;lt;first&amp;gt;, &amp;lt;second&amp;gt;, &amp;lt;percent&amp;gt; )]] -- Calculates the similarity between two input strings and return a percentage of the matching between the two input strings&lt;br /&gt;
* [[Core Function Split|Split( &amp;lt;expression&amp;gt;, &amp;lt;delim/pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Splits up a string into substrings depending on the given delimiters.&lt;br /&gt;
* [[Core Function SPrintf|SPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function)&lt;br /&gt;
* [[Core Function StartsWith|StartsWith( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if a string starts with a substring&lt;br /&gt;
* [[Core Function StrChr|StrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate first occurrence of character in string&lt;br /&gt;
* [[Core Function StrrChr|StrrChr( &amp;lt;haystack&amp;gt;, &amp;lt;char&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate last occurrence of character in string&lt;br /&gt;
* [[Core Function StrShuffle|StrShuffle( &amp;lt;str&amp;gt; )]] --  Randomly shuffles a string&lt;br /&gt;
* [[Core Function Strpbrk|Strpbrk( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt; )]] --  Locate a list of possible characters in string and return the position of it&lt;br /&gt;
* [[Core Function StripCSlashes|StripCSlashes( &amp;lt;str&amp;gt; )]] -- Unescape string escaped with AddCSlashes()&lt;br /&gt;
* [[Core Function StripTags|StripTags( &amp;lt;str&amp;gt;, &amp;lt;allowable_tags&amp;gt; )]] -- Strip HTML tags from a string&lt;br /&gt;
* [[Core Function StripWS|StripWS( &amp;lt;str&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;charList&amp;gt; )]] -- Strips the white space in a string or given characters.&lt;br /&gt;
* [[Core Function StrSpn|StrSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask&lt;br /&gt;
* [[Core Function StrCSpn|StrCSpn( &amp;lt;subject&amp;gt;, &amp;lt;mask&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] --  Find length of initial segment not matching mask&lt;br /&gt;
* [[Core Function StrCmp|StrCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- String comparison&lt;br /&gt;
* [[Core Function StrNatCmp|StrNatCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparisons using a &amp;quot;natural order&amp;quot; algorithm&lt;br /&gt;
* [[Core Function StrVersCmp|StrVersCmp( &amp;lt;str1&amp;gt;, &amp;lt;str2&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- String comparison holding name and indices/version numbers&lt;br /&gt;
* [[Core Function Soundex|Soundex( &amp;lt;str&amp;gt; )]] -- Calculate the soundex key of a string&lt;br /&gt;
* [[Core Function Str2Hex|Str2Hex( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to a hex string&lt;br /&gt;
* [[Core Function StrNew|StrNew( &amp;lt;char&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; ]] -- Create a new string of a given length filled with a given char&lt;br /&gt;
* [[Core Function StrInsert|StrInsert( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;expression2&amp;gt; )]] -- Insert a string at a given index of another string and return the new string&lt;br /&gt;
* [[Core Function StrIndex|StrIndex( &amp;lt;expression&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get or set a char from/to a string at a specific index&lt;br /&gt;
* [[Core Function StrIncrement|StrIncrement( &amp;lt;str&amp;gt; )]] -- Increment a string the same way as doing ++ on a string like $a++&lt;br /&gt;
* [[Core Function StrPos|StrPos( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the position of the first/last occurrence of a substring in a string&lt;br /&gt;
* [[Core Function StrTr|StrTr( &amp;lt;str&amp;gt;, &amp;lt;from-to/replace_pairs&amp;gt; )]] -- Translate characters or replace substrings&lt;br /&gt;
* [[Core Function StrTok|StrTok( &amp;lt;str/token&amp;gt;, &amp;lt;token&amp;gt; )]] -- Tokenize string&lt;br /&gt;
* [[Core Function StrStr|StrStr( &amp;lt;haystack&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;before_needle&amp;gt;, &amp;lt;find_last&amp;gt;, &amp;lt;case&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Find the first/last occurrence of a string&lt;br /&gt;
* [[Core Function StrLen|StrLen( &amp;lt;expression&amp;gt; )]] -- Returns length of specified string&lt;br /&gt;
* [[Core Function SubStr|SubStr( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;count&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function SubStrCount|SubStrCount( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Count the number of substring occurrences&lt;br /&gt;
* [[Core Function SubStrCmp|SubStrCmp( &amp;lt;main_str&amp;gt;, &amp;lt;str&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;ignoreCase&amp;gt; )]] -- Comparison of two strings from an offset, up to length characters&lt;br /&gt;
* [[Core Function SubStrReplace|SubStrReplace( &amp;lt;expression&amp;gt;, &amp;lt;replacement&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;length&amp;gt; )]] -- Replace text within a portion of a string&lt;br /&gt;
* [[Core Function Sub|Sub( &amp;lt;expression&amp;gt;, &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;replacement&amp;gt; )]] -- Return part of a string or replace it&lt;br /&gt;
* [[Core Function StrSplit|StrSplit( &amp;lt;expression&amp;gt;, &amp;lt;split_length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Convert a string to an array&lt;br /&gt;
* [[Core Function StrCompress|StrCompress( &amp;lt;expression&amp;gt; )]] -- Compress a string&lt;br /&gt;
* [[Core Function StrUncompress|StrUncompress( &amp;lt;expression&amp;gt; )]] -- Uncompress a string&lt;br /&gt;
* [[Core Function Trim|Trim( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Removes whitespace from the beginning and end of a string&lt;br /&gt;
* [[Core Function TrimLeft|TrimLeft( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the start of a string&lt;br /&gt;
* [[Core Function TrimRight|TrimRight( &amp;lt;expression&amp;gt;, &amp;lt;chars&amp;gt; )]] -- Strip whitespace from the end of a string&lt;br /&gt;
* [[Core Function TrimToNull|TrimToNull( &amp;lt;string&amp;gt; )]] -- Strip all zero chars (nulls) from the end of a string&lt;br /&gt;
* [[Core Function UC|UC( &amp;lt;expression&amp;gt; )]] -- Returns string in all Upper Case&lt;br /&gt;
* [[Core Function UCFirst|UCFirst( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of string&lt;br /&gt;
* [[Core Function UCLast|UCLast( &amp;lt;expression&amp;gt; )]] -- Upper Cases last letter of string&lt;br /&gt;
* [[Core Function UCWords|UCWords( &amp;lt;expression&amp;gt; )]] -- Upper Cases first letter of each word in string&lt;br /&gt;
* [[Core Function UUEncode|UUEncode( &amp;lt;expression&amp;gt; )]] -- Encodes a string using the uuencode algorithm&lt;br /&gt;
* [[Core Function UUDecode|UUDecode( &amp;lt;expression&amp;gt; )]] -- Decodes a string that was encode using the uuencode algorithm&lt;br /&gt;
* [[Core Function Unescape|Unescape( &amp;lt;expression&amp;gt;, &amp;lt;custom&amp;gt; )]] -- Remove all escapes from a string&lt;br /&gt;
* [[Core Function Unserialize|Unserialize( &amp;lt;string&amp;gt; )]] -- Convert a string (Created with Serialize()) into its original variable/class/array etc&lt;br /&gt;
* [[Core Function UrlEncodeBytes|UrlEncodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Cnvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function UrlDecodeBytes|UrlDecodeBytes( &amp;lt;binary&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;index&amp;gt;, &amp;lt;length&amp;gt; )]] -- Convert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes &lt;br /&gt;
* [[Core Function VSPrintf|VSPrintf( &amp;lt;format control&amp;gt;, &amp;lt;params&amp;gt;... )]] -- Returns a formatted string (similar to the C sprintf() function) but accepts arrays as the arguments&lt;br /&gt;
* [[Core Function WordWrap|WordWrap( &amp;lt;str&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;break&amp;gt;, &amp;lt;cut&amp;gt; )]] -- Wraps a string to a given number of characters&lt;br /&gt;
&lt;br /&gt;
==== Array Functions ====&lt;br /&gt;
* [[Core Function SameValues|SameValues( &amp;lt;array&amp;gt; )]] -- Check if all values within an array are the same value type such as all String and return the type or return error type&lt;br /&gt;
* [[Core Function ArrayScope|ArrayScope( &amp;lt;array&amp;gt;, &amp;lt;scope&amp;gt; )]] -- Get or Set an arrays internal Sputnik scope (Only to be used by Sputnik library developers)&lt;br /&gt;
* [[Core Function IsHash|IsHash( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Strings rather than numeric (Making it a full hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsHashAny|IsHashAny( &amp;lt;array&amp;gt; )]] -- Check if any of the keys in an array are Strings rather than numeric (Making it a possible hashmap rather than full array or mixed)&lt;br /&gt;
* [[Core Function IsArray|IsArray( &amp;lt;array&amp;gt; )]] -- Check if all the keys in an array are Numeric and none are String (Making it a full array rather than full hashmap or mixed)&lt;br /&gt;
* [[Core Function IsList|IsList( &amp;lt;array&amp;gt; )]] -- Same as IsArray but also checks to make sure the keys start at 0 and end at the highest with no gaps which makes it a perfect list&lt;br /&gt;
* [[Core Function Array|Array( &amp;lt;expressions&amp;gt; )]] -- Create a new array&lt;br /&gt;
* [[Core Function Clear|Clear( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Remove all items from an array&lt;br /&gt;
* [[Core Function Join|Join( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array into a string with an optional separator&lt;br /&gt;
* [[Core Function JoinKV|JoinKV( &amp;lt;array&amp;gt;, &amp;lt;separator&amp;gt; )]] -- Join an array (as keys and values) into a string with an optional separator&lt;br /&gt;
* [[Core Function Count|Count( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the size of array (How many elements it currently has stored)&lt;br /&gt;
* [[Core Function Fill|Fill( &amp;lt;start&amp;gt;, &amp;lt;num&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values&lt;br /&gt;
* [[Core Function FillKeys|FillKeys( &amp;lt;keys&amp;gt;, &amp;lt;value&amp;gt; )]] -- Fill an array with values, specifying keys&lt;br /&gt;
* [[Core Function UBound|UBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the highest element in an array&lt;br /&gt;
* [[Core Function LBound|LBound( &amp;lt;array/binary-array&amp;gt; )]] -- Returns the index of the lowest element in an array&lt;br /&gt;
* [[Core Function Push|Push( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the end of an array&lt;br /&gt;
* [[Core Function PushArray|PushArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the end of an array&lt;br /&gt;
* [[Core Function Insert|Insert( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to an array at a given location&lt;br /&gt;
* [[Core Function InsertArray|InsertArray( &amp;lt;array&amp;gt;, &amp;lt;id&amp;gt;, &amp;lt;arrays&amp;gt; )]] -- Add arrays to an array at a given location&lt;br /&gt;
* [[Core Function Pad|Pad( &amp;lt;array&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;value&amp;gt; )]] -- Pad array to the specified length with a value&lt;br /&gt;
* [[Core Function Unshift|Unshift( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add items to the beginning of an array&lt;br /&gt;
* [[Core Function UnshiftArray|UnshiftArray( &amp;lt;array&amp;gt;, &amp;lt;expressions&amp;gt; )]] -- Add arrays to the beginning of an array&lt;br /&gt;
* [[Core Function Pop|Pop( &amp;lt;array&amp;gt; )]] -- Delete the last item in an array&lt;br /&gt;
* [[Core Function Shift|Shift( &amp;lt;array&amp;gt; )]] -- Delete the first item in an array&lt;br /&gt;
* [[Core Function Range|Range( &amp;lt;start&amp;gt;, &amp;lt;end&amp;gt;, &amp;lt;step&amp;gt; )]] -- Create an array containing a range of elements&lt;br /&gt;
* [[Core Function Remove|Remove( &amp;lt;array&amp;gt;, &amp;lt;start-id&amp;gt;, &amp;lt;end-id&amp;gt; )]] -- Delete items from an array starting at a given location and stopping at a given location&lt;br /&gt;
* [[Core Function RemoveValue|RemoveValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific value or all matching values from an array&lt;br /&gt;
* [[Core Function RemoveValues|RemoveValues( &amp;lt;array&amp;gt;, &amp;lt;needles&amp;gt;, &amp;lt;useStrict&amp;gt;, &amp;lt;removeAll&amp;gt;, &amp;lt;recursive&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of specific values from an array&lt;br /&gt;
* [[Core Function RemoveKey|RemoveKey( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove a specific key from an array&lt;br /&gt;
* [[Core Function RemoveKeys|RemoveKeys( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;returnCopy&amp;gt; )]] -- Remove an array of keys from an recursively from an array&lt;br /&gt;
* [[Core Function IsIndexSet|IsIndexSet( &amp;lt;array&amp;gt;, &amp;lt;index&amp;gt; )]] -- Check if an element exist at a given index ID within an array&lt;br /&gt;
* [[Core Function Grep|Grep( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays values that match the given regex pattern&lt;br /&gt;
* [[Core Function GrepKeys|GrepKeys( &amp;lt;array&amp;gt;, &amp;lt;pattern&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns a new array consisting of the elements of the input arrays keys that match the given regex pattern&lt;br /&gt;
* [[Core Function Search|Search( &amp;lt;array&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;invert_flag&amp;gt;, &amp;lt;returnKeys&amp;gt; )]] -- Returns a new array consisting of the elements of the input array that match the given value&lt;br /&gt;
* [[Core Function Combine|Combine( &amp;lt;array-keys&amp;gt;, &amp;lt;array-values&amp;gt; )]] -- Creates a hash (Dictionary) by using the values from the keys array as keys and the values from the values array as the corresponding values&lt;br /&gt;
* [[Core Function Walk|Walk( &amp;lt;array&amp;gt;, &amp;lt;function&amp;gt; )]] -- Walk through the arrays items and execute a user defined function on each one&lt;br /&gt;
* [[Core Function Rev|Rev( &amp;lt;array&amp;gt; )]] -- Returns a new array consisting of the reverse of another array&lt;br /&gt;
* [[Core Function IsKeySet|IsKeySet( &amp;lt;array&amp;gt;, &amp;lt;key&amp;gt; )]] -- Check if given key exists within an array&lt;br /&gt;
* [[Core Function IsKeysSet|IsKeysSet( &amp;lt;array&amp;gt;, &amp;lt;keys&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Check if any/all/none of a given key from a key array was found inside an array&lt;br /&gt;
* [[Core Function Keys|Keys( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all KEYS from an array&lt;br /&gt;
* [[Core Function Values|Values( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Create an array containing all VALUES from an array&lt;br /&gt;
* [[Core Function InArray|InArray( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Checks if a value exists in an array&lt;br /&gt;
* [[Core Function Flip|Flip( &amp;lt;array&amp;gt; )]] -- Exchanges all keys with their associated values in an array&lt;br /&gt;
* [[Core Function Splice|Splice( &amp;lt;array&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;replace_with&amp;gt; )]] -- Cut out and return a chunk or portion of an array and optionally replace the cut out section with new data.&lt;br /&gt;
* [[Core Function Order|Order( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Fix the order of numeric array elements from 0 to whatever.&lt;br /&gt;
* [[Core Function Sort|Sort( &amp;lt;array&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Sort an array by value or keys optionally modify it in place or return new and optionally use a custom function to decide how to sort it&lt;br /&gt;
* [[Core Function CountValues|CountValues( &amp;lt;array&amp;gt; )]] -- Counts all the values of an array&lt;br /&gt;
* [[Core Function SumKeys|SumKeys( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the keys of an array&lt;br /&gt;
* [[Core Function SumValues|SumValues( &amp;lt;array&amp;gt; )]] -- Counts the sum total of all the values of an array&lt;br /&gt;
* [[Core Function IndexOfValue|IndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexOfValueAny|IndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array) exists in an array and returns its index value&lt;br /&gt;
* [[Core Function IndexNotOfValue|IndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the first index that does not contain the value&lt;br /&gt;
* [[Core Function IndexNotOfValueAny|IndexNotOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value (from an array) in an array and returns the first index that does not contain any of the values&lt;br /&gt;
* [[Core Function LastIndexOfValue|LastIndexOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value exists in an array and returns the index of the last occurrence of the value&lt;br /&gt;
* [[Core Function LastIndexOfValueAny|LastIndexOfValueAny( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks if a value (from an array of values) exists in an array and returns the index of the last occurrence of the value (from the value array)&lt;br /&gt;
* [[Core Function LastIndexNotOfValue|LastIndexNotOfValue( &amp;lt;array&amp;gt;, &amp;lt;needle&amp;gt;, &amp;lt;strict&amp;gt;, &amp;lt;ignoreCase&amp;gt;, &amp;lt;skipStringKeys&amp;gt; )]] -- Checks for the non-occurrence of a value in an array and returns the last index that does not contain the value&lt;br /&gt;
&lt;br /&gt;
==== Linq (Integrated Language Query) Functions ====&lt;br /&gt;
These functions are basically quick ways to shuffle arrays around (sort and organize them etc) and are BEST suited for when the array contains nothing but Classes but you can use them on any array if you want.&lt;br /&gt;
* [[Core Function All|All( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of all elements in the query are a true match&lt;br /&gt;
* [[Core Function Any|Any( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Check of any of the elements in the query are a true match&lt;br /&gt;
* [[Core Function Concat|Concat( &amp;lt;array&amp;gt;, &amp;lt;array&amp;gt;... )]] -- Join multiple arrays (query results?) together&lt;br /&gt;
* [[Core Function First|First( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the first matching element from the query&lt;br /&gt;
* [[Core Function FirstOrDefault|FirstOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the first matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Last|Last( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Return the last matching element from the query&lt;br /&gt;
* [[Core Function LastOrDefault|LastOrDefault( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt;, &amp;lt;default&amp;gt; )]] -- Return the last matching element from the query or return the default variable given&lt;br /&gt;
* [[Core Function Where|Where( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and returns all matching&lt;br /&gt;
* [[Core Function WhereNot|WhereNot( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Filters an array based on a query and all non matching&lt;br /&gt;
* [[Core Function SumInt|SumInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as an Int64&lt;br /&gt;
* [[Core Function SumUInt|SumUInt( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a UInt64&lt;br /&gt;
* [[Core Function SumDouble|SumDouble( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Adds up all matching elements from the query and returns it as a Double&lt;br /&gt;
* [[Core Function Obtain|Obtain( &amp;lt;array&amp;gt;, &amp;lt;query&amp;gt; )]] -- Gathers up all matching elements from the query and returns them (Unlike Where() this returns the values directly instead of their source so instead of returning the class it will return the variable)&lt;br /&gt;
&lt;br /&gt;
==== Enum Functions ====&lt;br /&gt;
* [[Core Function Enumerate|Enumerate( &amp;lt;enum&amp;gt; )]] -- Cycle through all Name + Values in an enum&lt;br /&gt;
* [[Core Function EnumKey|EnumKey( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the string KEY for a given integer value&lt;br /&gt;
* [[Core Function EnumValue|EnumValue( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Return the integer value for a given string KEY&lt;br /&gt;
* [[Core Function EnumAdd|EnumAdd( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Add a new key and value to an existing enum&lt;br /&gt;
* [[Core Function EnumDel|EnumDel( &amp;lt;enum&amp;gt;, &amp;lt;key&amp;gt; )]] -- Delete a key and value from an existing enum&lt;br /&gt;
* [[Core Function EnumIsDefined|EnumIsDefined( &amp;lt;enum&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a given value exists within an enum&lt;br /&gt;
&lt;br /&gt;
==== Process Functions ====&lt;br /&gt;
* [[Core Function DLLCall|DLLCall( &amp;lt;Dll/DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt;, &amp;lt;Parms&amp;gt; )]] -- Dynamically call a function in a DLL&lt;br /&gt;
* [[Core Function DLLOpen|DLLOpen( &amp;lt;DLLName&amp;gt;, &amp;lt;FunctionName/Alias&amp;gt;, &amp;lt;ReturnType&amp;gt;, &amp;lt;ParameterType&amp;gt;, &amp;lt;CharSet/CallingConvention&amp;gt; )]] -- Open a DLL and get a function from it and return it as a ready to call object function that is already compiled (vastly speeding up the repeat call speed)&lt;br /&gt;
* [[Core Function DLLClose|DLLClose( &amp;lt;DLL&amp;gt; )]] -- Close and unset a return value from DLLOpen()&lt;br /&gt;
* [[Core Function DLLImport|DLLImport( &amp;lt;varies...&amp;gt; )]] -- Dynamically load a function from a DLL and transform it to act and behave like a normal Sputnik function (Can load thousands functions at a time and even save the loaded stuff to DLL for quick access later)&lt;br /&gt;
* [[Core Function Exec|Exec( &amp;lt;command&amp;gt;, &amp;lt;output&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program&lt;br /&gt;
* [[Core Function ExecShell|ExecShell( &amp;lt;command&amp;gt; )]] -- Execute command via shell and return the complete output as a string&lt;br /&gt;
* [[Core Function ExecSystem|ExecSystem( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display the output&lt;br /&gt;
* [[Core Function Passthru|Passthru( &amp;lt;command&amp;gt;, &amp;lt;return_var&amp;gt; )]] -- Execute an external program and display raw output&lt;br /&gt;
* [[Core Function System|System( &amp;lt;expression&amp;gt; )]] -- Execute system command&lt;br /&gt;
* [[Core Function Run|Run( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program&lt;br /&gt;
* [[Core Function RunWait|RunWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program and waits until the program finishes&lt;br /&gt;
* [[Core Function RunShell|RunShell( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute)&lt;br /&gt;
* [[Core Function RunShellWait|RunShellWait( &amp;lt;file&amp;gt;, &amp;lt;timeout&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;show options&amp;gt; )]] -- Runs an external program (Using ShellExecute) and waits until the program finishes&lt;br /&gt;
* [[Core Function RunAsSet|RunAsSet( &amp;lt;user&amp;gt;, &amp;lt;domain&amp;gt;, &amp;lt;password&amp;gt;, &amp;lt;options&amp;gt; )]] -- Initialise a set of user credentials to use during Run and RunWait operations.&lt;br /&gt;
* [[Core Function RunCapture|RunCapture( &amp;lt;file&amp;gt;, &amp;lt;arguments&amp;gt;, &amp;lt;workdir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;function&amp;gt; )]] -- Run a program in a hidden window and capture its printed output as strings&lt;br /&gt;
* [[Core Function PHandle|PHandle( )]] -- Get the process handle of this program&lt;br /&gt;
* [[Core Function ProcessClose|ProcessClose( &amp;lt;pid/name&amp;gt; )]] -- Terminates a named process&lt;br /&gt;
* [[Core Function ProcessID|ProcessID( &amp;lt;name&amp;gt; )]] -- Gets the process ID of a given name&lt;br /&gt;
* [[Core Function ProcessExists|ProcessExists( &amp;lt;pid/name&amp;gt; )]] -- Checks to see if a specified process exists&lt;br /&gt;
* [[Core Function ProcessList|ProcessList( &amp;lt;name&amp;gt; )]] -- Returns an array listing the currently running processes (names and PIDs)&lt;br /&gt;
* [[Core Function ProcessSetPriority|ProcessSetPriority( &amp;lt;pid/name&amp;gt;, &amp;lt;priority&amp;gt; )]] -- Changes the priority of a process&lt;br /&gt;
* [[Core Function ProcessWait|ProcessWait( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process exists or optional the timeout expires&lt;br /&gt;
* [[Core Function ProcessWaitClose|ProcessWaitClose( &amp;lt;pid/name&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Pauses the current thread until a given process no longer exists or optional the timeout expires&lt;br /&gt;
* [[Core Function Shutdown|Shutdown( &amp;lt;shutdown code&amp;gt; )]] -- Shuts down the system&lt;br /&gt;
* [[Core Function Debug|Debug( &amp;lt;flag&amp;gt; )]] -- Enter or leave debug mode in debug state the program can interact with operating system processes that run in a special mode by enabling the native property SeDebugPrivilege on the current thread&lt;br /&gt;
&lt;br /&gt;
==== Environment Management ====&lt;br /&gt;
* [[Core Function EnvExpand|EnvExpand( &amp;lt;expression&amp;gt; )]] -- Convert a string containing %name% env tags and return complete string with names resolved&lt;br /&gt;
* [[Core Function EnvGet|EnvGet( &amp;lt;tag&amp;gt; )]] -- Get the value of an environment variable&lt;br /&gt;
* [[Core Function EnvSet|EnvSet( &amp;lt;tag&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set the value of an environment variable&lt;br /&gt;
* [[Core Function EnvUpdate|EnvUpdate( )]] -- Refreshes the OS environment&lt;br /&gt;
&lt;br /&gt;
==== File Functions ====&lt;br /&gt;
&lt;br /&gt;
===== File Create/Read/Write Functions =====&lt;br /&gt;
* [[Core Function FileOpen|FileOpen( &amp;lt;FileName&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Opens a file for reading or writing&lt;br /&gt;
* [[Core Function FileOpenText|FileOpenText( &amp;lt;FileName&amp;gt; )]] -- Opens a file for reading only (text files only)&lt;br /&gt;
* [[Core Function FileClose|FileClose( &amp;lt;file&amp;gt; )]] -- Closes a previously opened file&lt;br /&gt;
* [[Core Function FileWrite|FileWrite( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write text to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteBinary|FileWriteBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Write the data from a binary variable to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileWriteLines|FileWriteLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Write an array of lines to previously opened file at the current File Steam pointer location&lt;br /&gt;
* [[Core Function FileAppend|FileAppend( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append a line of text to the end of a previously opened text file&lt;br /&gt;
* [[Core Function FileAppendBinary|FileAppendBinary( &amp;lt;file&amp;gt;, &amp;lt;binary-array&amp;gt; )]] -- Append the data from a binary variable to the end of a previously opened file&lt;br /&gt;
* [[Core Function FileAppendLines|FileAppendLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Append an array of lines to the end of previously opened file&lt;br /&gt;
* [[Core Function FileSeek|FileSeek( &amp;lt;file&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Change the POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FilePos|FilePos( &amp;lt;file&amp;gt; )]] -- Get the current POSITION of the File Stream pointer&lt;br /&gt;
* [[Core Function FileRead|FileRead( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a text file starting from current File Steam pointer location and return them as a string&lt;br /&gt;
* [[Core Function FileReadBinary|FileReadBinary( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a number of bytes from a file starting from current File Steam pointer location&lt;br /&gt;
* [[Core Function FileReadLine|FileReadLine( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Read a line of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadLines|FileReadLines( &amp;lt;file&amp;gt; )]] -- Read all lines of text from a previously opened text file (Or specify a name of a file)&lt;br /&gt;
* [[Core Function FileReadText|FileReadText( &amp;lt;file&amp;gt;, &amp;lt;format&amp;gt;, &amp;lt;length&amp;gt; )]] -- Read text from a file opened by FileOpenText() using the format and length params&lt;br /&gt;
* [[Core Function FileTemp|FileTemp(  )]] -- Create a uniquely named, zero-byte temporary file on disk and returns the full path of it&lt;br /&gt;
* [[Core Function FileSave|FileSave( &amp;lt;file&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;useAscii&amp;gt; )]] -- Save all text to a file&lt;br /&gt;
* [[Core Function FileLoad|FileLoad( &amp;lt;file&amp;gt; )]] -- Load all text from a file&lt;br /&gt;
&lt;br /&gt;
===== Misc =====&lt;br /&gt;
* [[Core Function FileMove|FileMove( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Move a file&lt;br /&gt;
* [[Core Function FileCopy|FileCopy( &amp;lt;file1&amp;gt;, &amp;lt;file2&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Copy a file&lt;br /&gt;
* [[Core Function FileDelete|FileDelete( &amp;lt;file&amp;gt; )]] -- Delete a file&lt;br /&gt;
* [[Core Function FileExists|FileExists( &amp;lt;file&amp;gt; )]] -- Check if a given file exists&lt;br /&gt;
* [[Core Function FileCreationTime|FileCreationTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the creation time of a file&lt;br /&gt;
* [[Core Function FileWriteTime|FileWriteTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last write time of a file&lt;br /&gt;
* [[Core Function FileAccessTime|FileAccessTime( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get the last access time of a file&lt;br /&gt;
* [[Core Function FileEncrypt|FileEncrypt( &amp;lt;file&amp;gt; )]] -- Encrypt a file so only the windows account used to encrypt it can decrypt it&lt;br /&gt;
* [[Core Function FileDecrypt|FileDecrypt( &amp;lt;file&amp;gt; )]] -- Decrypt a file previously encrypted by this windows user account&lt;br /&gt;
* [[Core Function FileMD5|FileMD5( &amp;lt;file&amp;gt; )]] -- Calculate the MD5 checksum of a file&lt;br /&gt;
* [[Core Function FileSHA1|FileSHA1( &amp;lt;file&amp;gt; )]] -- Calculate the SHA1 checksum of a file&lt;br /&gt;
* [[Core Function FileSize|FileSize( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Returns the file size in bytes (or return the formatted size)&lt;br /&gt;
* [[Core Function FileIsText|FileIsText( &amp;lt;file&amp;gt;, &amp;lt;length&amp;gt; )]] -- Returns true if the file contains only text&lt;br /&gt;
* [[Core Function FileRecycleEmpty|FileRecycleEmpty( &amp;lt;root&amp;gt; )]] -- Empty the recycle bin with no GUI, sound or confirmation&lt;br /&gt;
* [[Core Function FileRecycle|FileRecycle( &amp;lt;filename&amp;gt; )]] -- Move a file or directory to the recycle bin&lt;br /&gt;
* [[Core Function FileMatch|FileMatch( &amp;lt;pattern&amp;gt;, &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Match filename against a Glob pattern&lt;br /&gt;
&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FileSaveDialog|FileSaveDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Save File Dialog&lt;br /&gt;
* [[Core Function FileOpenDialog|FileOpenDialog ( &amp;lt;title&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;filter&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;default name&amp;gt; )]] -- Initiates a Load File Dialog&lt;br /&gt;
&lt;br /&gt;
==== Directory Functions ====&lt;br /&gt;
* [[Core Function GetFiles|GetFiles ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all files in a directory&lt;br /&gt;
* [[Core Function GetFolders|GetFolders ( &amp;lt;path&amp;gt;, &amp;lt;pattern&amp;gt; )]] -- Get an array of all folders in a directory&lt;br /&gt;
* [[Core Function Glob|Glob( &amp;lt;pattern&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Find files/folders matching a pattern&lt;br /&gt;
* [[Core Function MKDir|MKDir ( &amp;lt;path&amp;gt; )]] -- Creates all directories and subdirectories as specified by path&lt;br /&gt;
* [[Core Function RMDir|RMDir ( &amp;lt;path&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Deletes the specified directory and, if indicated, any subdirectories in the directory&lt;br /&gt;
* [[Core Function DirExists|DirExists ( &amp;lt;path&amp;gt; )]] -- Determines whether the given path refers to an existing directory on disk&lt;br /&gt;
* [[Core Function DirCopy|DirCopy ( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Copies a directory and all sub-directories and files (Similar to xcopy)&lt;br /&gt;
* [[Core Function DirMove|DirMove( &amp;lt;sourcepath&amp;gt;, &amp;lt;destpath&amp;gt; )]] -- Moves a directory to another location&lt;br /&gt;
* [[Core Function DirSize|DirSize( &amp;lt;path&amp;gt; )]] -- Returns the size in bytes of a whole directory&lt;br /&gt;
* [[Core Function CurDir|CurDir ( &amp;lt;path&amp;gt; )]] -- Get or Set the current working directory&lt;br /&gt;
* [[Core Function CombinePath|CombinePath( &amp;lt;path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Safe way to combine two paths into one&lt;br /&gt;
* [[Core Function GetRelativePath|GetRelativePath( &amp;lt;Path1&amp;gt;, &amp;lt;path2&amp;gt; )]] -- Try makes a path relative to another&lt;br /&gt;
===== Dialogs =====&lt;br /&gt;
* [[Core Function FolderSelectDialog|FolderSelectDialog ( &amp;lt;text&amp;gt;, &amp;lt;dir&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;init dir&amp;gt; )]] -- Initiates a Browse For Folder Dialog&lt;br /&gt;
&lt;br /&gt;
==== Path Functions ====&lt;br /&gt;
* [[Core Function ParsePath|ParsePath ( &amp;lt;path&amp;gt; )]] -- Resolve a file name and locate its full path&lt;br /&gt;
* [[Core Function HasExtension|HasExtension ( &amp;lt;path&amp;gt; )]] -- Determines whether a path includes a file name extension&lt;br /&gt;
* [[Core Function GetFullPath|GetFullPath ( &amp;lt;path&amp;gt; )]] -- Returns the absolute path for the specified path string&lt;br /&gt;
* [[Core Function GetDirectoryName|GetDirectoryName ( &amp;lt;path&amp;gt; )]] -- Returns the directory information for the specified path string&lt;br /&gt;
* [[Core Function GetExtension|GetExtension ( &amp;lt;path&amp;gt; )]] -- Returns the extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileName|GetFileName ( &amp;lt;path&amp;gt; )]] -- Returns the file name and extension of the specified path string&lt;br /&gt;
* [[Core Function GetFileNameWithoutExtension|GetFileNameWithoutExtension ( &amp;lt;path&amp;gt; )]] -- Returns the file name of the specified path string without the extension&lt;br /&gt;
* [[Core Function GetPathRoot|GetPathRoot ( &amp;lt;path&amp;gt; )]] -- Gets the root directory information of the specified path&lt;br /&gt;
* [[Core Function IsPathRooted|IsPathRooted ( &amp;lt;path&amp;gt; )]] -- Gets a value indicating whether the specified path string contains absolute or relative path information&lt;br /&gt;
* [[Core Function GetDosPath|GetDosPath( &amp;lt;path&amp;gt; )]] -- Returns a given path in DOS friendly style (shortened)&lt;br /&gt;
* [[Core Function AddPath|AddPath( &amp;lt;path&amp;gt; )]] -- Add a directory to the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
* [[Core Function DelPath|DelPath( &amp;lt;path&amp;gt; )]] -- Remove a directory from the search list when using ParsePath() and all other functions such as Include(), Require() etc&lt;br /&gt;
&lt;br /&gt;
==== Network Functions ====&lt;br /&gt;
&lt;br /&gt;
===== HTTP Functions =====&lt;br /&gt;
* [[Core Function HTTPFileExists|HTTPFileExists( &amp;lt;url&amp;gt; )]] -- Check if a file exists at a given URL&lt;br /&gt;
* [[Core Function HTTPGetString|HTTPGetString( &amp;lt;url&amp;gt; )]] -- Copy all text from a URL and return it as a string&lt;br /&gt;
* [[Core Function HTTPDownload|HTTPDownload( &amp;lt;url&amp;gt;, &amp;lt;dest&amp;gt;, &amp;lt;progress&amp;gt;, &amp;lt;completed&amp;gt;, &amp;lt;param&amp;gt; )]] -- Download a file from a given URL&lt;br /&gt;
&lt;br /&gt;
===== MySQL Functions =====&lt;br /&gt;
* [[Core Function MySQLConnect|MySQLConnect( &amp;lt;ip/ip:port&amp;gt;, &amp;lt;login&amp;gt;, &amp;lt;password&amp;gt; )]] -- Connect to a MySQL database&lt;br /&gt;
* [[Core Function MySQLSelectDB|MySQLSelectDB( &amp;lt;mysql&amp;gt;, &amp;lt;db name&amp;gt; )]] -- Select a database&lt;br /&gt;
* [[Core Function MySQLQuery|MySQLQuery( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Execute a query&lt;br /&gt;
* [[Core Function MySQLFill|MySQLFill( &amp;lt;mysql&amp;gt;, &amp;lt;query&amp;gt; )]] -- Grab a table or parts of it from the Database&lt;br /&gt;
* [[Core Function MySQLFetch|MySQLFetch( &amp;lt;mysql data&amp;gt; )]] -- Fetch the next row from a table&lt;br /&gt;
* [[Core Function MySQLFetchReset|MySQLFetchReset( &amp;lt;mysql data&amp;gt; )]] -- Reset the current position in the table rows to 0&lt;br /&gt;
* [[Core Function MySQLFields|MySQLFields( &amp;lt;mysql data&amp;gt; )]] -- Return how many Fields are in the table&lt;br /&gt;
* [[Core Function MySQLRows|MySQLRows( &amp;lt;mysql data&amp;gt; )]] -- Return how many Rows are in the table&lt;br /&gt;
* [[Core Function MySQLClose|MySQLClose( &amp;lt;mysql&amp;gt; )]] -- Close a MySQL connection&lt;br /&gt;
&lt;br /&gt;
===== Sputnik Client/Server Functions (This is just for connecting Sputnik Clients to Sputnik Servers nothing else) =====&lt;br /&gt;
* [[Core Function SSListen|SSListen( &amp;lt;port&amp;gt;, &amp;lt;max connections&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Create a server and begin listening for clients to connect&lt;br /&gt;
* [[Core Function SSConnect|SSConnect( &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;connection string&amp;gt;, &amp;lt;name&amp;gt;  )]] -- Connect to a server&lt;br /&gt;
* [[Core Function SSApprove|SSApprove( &amp;lt;client socket&amp;gt; )]] -- Approve a client to connect to the server&lt;br /&gt;
* [[Core Function SSDisapprove|SSDisapprove( &amp;lt;client socket&amp;gt; )]] -- Disapprove a client to connect to the server&lt;br /&gt;
* [[Core Function SSClientStatus|SSClientStatus( &amp;lt;client/client socket&amp;gt; )]] -- Get the status of a client or of our client&lt;br /&gt;
* [[Core Function SSClientIP|SSClientIP( &amp;lt;client socket&amp;gt; )]] -- Get the IP of a client socket&lt;br /&gt;
* [[Core Function SSRecv|SSRecv( &amp;lt;server/client&amp;gt; )]] -- Check for a message recieved from client/server&lt;br /&gt;
* [[Core Function SSRead|SSRead( &amp;lt;client/server&amp;gt;, &amp;lt;data type&amp;gt; )]] --Read data from a client/server&lt;br /&gt;
* [[Core Function SSDrop|SSDrop( &amp;lt;client socket&amp;gt;, &amp;lt;reason&amp;gt; )]] -- Kick a client off the server&lt;br /&gt;
* [[Core Function SSSend|SSSend( /* depends... /* )]] -- Send data to client or server&lt;br /&gt;
* [[Core Function SSBufferNew|SSBufferNew( &amp;lt;nothing/server/client&amp;gt; )]] -- Create a new net buffer to store data to send to the client/server&lt;br /&gt;
* [[Core Function SSBufferPut|SSBufferPut( &amp;lt;netBuffer&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Add data to a net buffer&lt;br /&gt;
&lt;br /&gt;
===== Raw Sockets (TCP/UDP etc) =====&lt;br /&gt;
* [[Core Function SocketAccept|SocketAccept( &amp;lt;socket&amp;gt;  )]] -- Creates a new &amp;lt;socket&amp;gt; for a newly created connection&lt;br /&gt;
* [[Core Function SocketAvailable|SocketAvailable( &amp;lt;socket&amp;gt;  )]] -- Gets the amount of data that has been received from the network and is available to be read&lt;br /&gt;
* [[Core Function SocketBind|SocketBind( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Associates a &amp;lt;socket&amp;gt; with a local endpoint&lt;br /&gt;
* [[Core Function SocketClose|SocketClose( &amp;lt;socket&amp;gt;, &amp;lt;wait&amp;gt;  )]] -- Closes the &amp;lt;socket&amp;gt; connection and releases all associated resources&lt;br /&gt;
* [[Core Function SocketConnect|SocketConnect( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;  )]] -- Establishes a connection to a remote host&lt;br /&gt;
* [[Core Function SocketConnected|SocketConnected( &amp;lt;socket&amp;gt; )]] -- Checks if a socket is connected and ready for use or not&lt;br /&gt;
* [[Core Function SocketCreate|SocketCreate( &amp;lt;sockettype&amp;gt;, &amp;lt;protocoltype&amp;gt;, &amp;lt;addressfamily&amp;gt; )]] -- Create a new &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketListen|SocketListen( &amp;lt;socket&amp;gt;, &amp;lt;backlog&amp;gt;  )]] -- Places a &amp;lt;socket&amp;gt; in a listening state&lt;br /&gt;
* [[Core Function SocketReceive|SocketReceive( &amp;lt;socket&amp;gt;, &amp;lt;buffersize&amp;gt;  )]] -- Receives data from a bound &amp;lt;socket&amp;gt; into a receive buffer&lt;br /&gt;
* [[Core Function SocketReadChar|SocketReadChar( &amp;lt;socket&amp;gt;, &amp;lt;count&amp;gt;  )]] -- Receives a single (or a specified amount) of char(s) from a bound &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketReadLine|SocketReadLine( &amp;lt;socket&amp;gt;  )]] -- Receives the next line from a bound &amp;lt;socket&amp;gt; (useful for Telnet style stuff)&lt;br /&gt;
* [[Core Function SocketSend|SocketSend( &amp;lt;socket&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketSendTo|SocketSendTo( &amp;lt;socket&amp;gt;, &amp;lt;ip&amp;gt;, &amp;lt;port&amp;gt;, &amp;lt;binary-variable&amp;gt;, &amp;lt;length&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends data to the specified ip + port&lt;br /&gt;
* [[Core Function SocketSendFile|SocketSendFile( &amp;lt;socket&amp;gt;, &amp;lt;file-name&amp;gt;  )]] -- Sends a file as data to a connected &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIP|SocketIP( &amp;lt;socket&amp;gt;, &amp;lt;remote/local&amp;gt;  )]] -- Get the Remote or Local IP of a socket&lt;br /&gt;
* [[Core Function SocketShutdown|SocketShutdown( &amp;lt;socket&amp;gt;, &amp;lt;shutdown-type&amp;gt;  )]] -- Disables sends and receives on a &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketPoll|SocketPoll( &amp;lt;socket&amp;gt;, &amp;lt;milliseconds&amp;gt;, &amp;lt;type&amp;gt;  )]] -- Sends a kind of ping to determine the status of the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketHandle|SocketHandle( &amp;lt;socket&amp;gt; )]] -- Gets the operating system handle for the &amp;lt;socket&amp;gt;&lt;br /&gt;
* [[Core Function SocketIsBound|SocketIsBound( &amp;lt;socket&amp;gt; )]] -- Gets a value that indicates whether the &amp;lt;socket&amp;gt; is bound to a specific local port&lt;br /&gt;
* [[Core Function SocketOpt|SocketOpt( &amp;lt;socket&amp;gt;, &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt;  )]] -- Get or Set a setting on a &amp;lt;socket&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Misc Network Functions =====&lt;br /&gt;
* [[Core Function HostResolve|HostResolve( &amp;lt;host name&amp;gt; )]] -- Resolves a host name such as google.com into an IP address&lt;br /&gt;
* [[Core Function Ping|Ping( &amp;lt;ip address/host name&amp;gt; )]] -- Pings a host and returns the roundtrip-time&lt;br /&gt;
&lt;br /&gt;
==== Memory Functions ====&lt;br /&gt;
* [[Core Function Alloc|Alloc( &amp;lt;size&amp;gt;, &amp;lt;filler&amp;gt; )]] -- Allocate memory and return the pointer to it&lt;br /&gt;
* [[Core Function Realloc|Realloc( &amp;lt;ptr&amp;gt;, &amp;lt;size&amp;gt; )]] -- Resizes a block of memory previously allocated with Alloc()&lt;br /&gt;
* [[Core Function Free|Free( &amp;lt;ptr&amp;gt; )]] -- Deallocate memory from a pointer&lt;br /&gt;
* [[Core Function StringToPTR|StringToPTR( &amp;lt;type&amp;gt;, &amp;lt;string&amp;gt; )]] -- Allocates memory for the string and writes the string to that memory and returns the pointer for that memory&lt;br /&gt;
* [[Core Function PTRToString|PTRToString( &amp;lt;type&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a string from a memory pointer&lt;br /&gt;
* [[Core Function PTRRead|PTRRead( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt; )]] -- Read data from a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRWrite|PTRWrite( &amp;lt;ptr&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;offset&amp;gt;, &amp;lt;value&amp;gt; )]] -- Write data to a memory pointer optionally starting from a given index&lt;br /&gt;
* [[Core Function PTRToDLLStruct|PTRToDLLStruct( &amp;lt;def string&amp;gt;, &amp;lt;ptr&amp;gt; )]] -- Reads a DLLStruct from a memory pointer&lt;br /&gt;
* [[Core Function DLLStructCreateDef|DLLStructCreateDef( &amp;lt;name&amp;gt;, &amp;lt;def string&amp;gt; )]] -- Creates a named C/C++ style structure definition that can be used with DLLStructCreate and can also be placed inside other DLLStructs&lt;br /&gt;
* [[Core Function DLLStructGetDef|DLLStructGetDef( &amp;lt;name&amp;gt;/&amp;lt;dllstruct&amp;gt; )]] -- Return the &amp;lt;def string&amp;gt; of a given DLLStruct&lt;br /&gt;
* [[Core Function DLLStructCreate|DLLStructCreate( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructCreateUnion|DLLStructCreateUnion( &amp;lt;def string&amp;gt; )]] -- Creates a C/C++ style structure (union) to be used with DLLCall&lt;br /&gt;
* [[Core Function DLLStructGetData|DLLStructGetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the data of an element of the struct&lt;br /&gt;
* [[Core Function DLLStructSetData|DLLStructSetData( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Set the data of an element of the struct&lt;br /&gt;
* [[Core Function DllStructGetSize|DLLStructGetSize( &amp;lt;dllstruct&amp;gt; )]] -- Returns the size of the struct in bytes&lt;br /&gt;
* [[Core Function DllStructGetPtr|DLLStructGetPtr( &amp;lt;dllstruct&amp;gt;, &amp;lt;element&amp;gt;, &amp;lt;index&amp;gt; )]] -- Returns the pointer to the struct or an element in the struct or even a specific index of an array object within an elment&lt;br /&gt;
* [[Core Function DllStructGetVars|DLLStructGetVars( &amp;lt;dllstruct&amp;gt; )]] -- Create an array of all items and their array size with total byte size&lt;br /&gt;
&lt;br /&gt;
==== Clipboard Functions ====&lt;br /&gt;
* [[Core Function ClipGet|ClipGet( &amp;lt;type&amp;gt; )]] -- Get data from the clipboard&lt;br /&gt;
* [[Core Function ClipSet|ClipSet( &amp;lt;type&amp;gt;, &amp;lt;expression&amp;gt; )]] -- Set data to the clipboard&lt;br /&gt;
&lt;br /&gt;
==== Registry Functions ====&lt;br /&gt;
* [[Core Function RegRead|RegRead( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;default&amp;gt; )]] -- Reads a value from the registry&lt;br /&gt;
* [[Core Function RegWrite|RegWrite( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;type&amp;gt;, &amp;lt;data&amp;gt; )]] -- Sets a value in the registry&lt;br /&gt;
* [[Core Function RegDelete|RegDelete( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Delete a key or value from the registry&lt;br /&gt;
* [[Core Function RegKeyList|RegKeyList( &amp;lt;key&amp;gt; )]] -- Return an array of all the keys at this location in the registry&lt;br /&gt;
* [[Core Function RegValueList|RegValueList( &amp;lt;key&amp;gt; )]] -- Return an array of all the values at this location in the registry&lt;br /&gt;
* [[Core Function RegKeyExists|RegKeyExists( &amp;lt;key&amp;gt; )]] -- Check if a key exists in the registry&lt;br /&gt;
* [[Core Function RegValueExists|RegValueExists( &amp;lt;key&amp;gt;, &amp;lt;value&amp;gt; )]] -- Check if a key value in the registry&lt;br /&gt;
&lt;br /&gt;
==== Time &amp;amp; Date Functions ====&lt;br /&gt;
* [[Core Function Time|Time( &amp;lt;array&amp;gt; )]] -- Returns the current time or calculates the time in seconds from an associative array&lt;br /&gt;
* [[Core Function MicroTime|MicroTime( &amp;lt;returnAsDouble&amp;gt; )]] -- Returns the current Unix timestamp with microseconds&lt;br /&gt;
* [[Core Function Date|Date( &amp;lt;format&amp;gt;, &amp;lt;time&amp;gt; )]] -- Returns a string with the date and time formatted according to the format given. If no time is supplied defaults to the current time&lt;br /&gt;
* [[Core Function TimerInit|TimerInit( )]] -- Returns a handle that can be passed to TimerDiff() to calculate the difference in milliseconds&lt;br /&gt;
* [[Core Function TimerDiff|TimerDiff( &amp;lt;handle&amp;gt; )]] -- Returns the difference in time from a previous call to TimerInit()&lt;br /&gt;
* [[Core Function Sleep|Sleep( &amp;lt;milliseconds&amp;gt;, &amp;lt;doEvents&amp;gt; )]] -- Pause the current executing thread for the given milliseconds&lt;br /&gt;
* [[Core Function USleep|USleep( &amp;lt;microseconds&amp;gt; )]] -- Pause the current executing thread for the given microseconds&lt;br /&gt;
* [[Core Function TickCount|TickCount( &amp;lt;ticks&amp;gt; )]] -- Retrieves the number of milliseconds that have elapsed since the current instance of Sputnik was started&lt;br /&gt;
&lt;br /&gt;
==== Old GUI Functions ====&lt;br /&gt;
&lt;br /&gt;
All the functions below are part of the SputnikOldGUI.dll basically these functions are *to be* depreciated and replaced with something much better in the future.&lt;br /&gt;
&lt;br /&gt;
However you can still use these and even after they have been replaced with a new GUI system you will still be able to use these functions (and GUI programs made with them) anyway by using the SputnikOldGUI.dll into your project.&lt;br /&gt;
&lt;br /&gt;
To use any of these functions you must include the SputnikOldGUI.dll to do that you must add this code to the top of your script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of using &amp;quot;GUICreate&amp;quot; in a full example and including the SputnikOldGUI.dll&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Load the old GUI system&lt;br /&gt;
// Since this an old GUI example&lt;br /&gt;
use('SputnikOldGUI.dll', true);&lt;br /&gt;
// Create the GUI&lt;br /&gt;
Global $GUI = GUICreate(&amp;quot;Window&amp;quot;, &amp;quot;My Title&amp;quot;, 200, 200);&lt;br /&gt;
// Create a button -- This button will simply display a message&lt;br /&gt;
Global $Button = GUICreate(&amp;quot;Button&amp;quot;, $GUI, &amp;quot;Press Me!&amp;quot;, 8, 8);&lt;br /&gt;
// Add a link to the button&lt;br /&gt;
GUILink($Button, &amp;quot;Click&amp;quot;, 'myFunction();'); // Call function&lt;br /&gt;
// Show the GUI&lt;br /&gt;
GUILoad( $GUI );&lt;br /&gt;
// Keep the GUI running as long as long as the window is open&lt;br /&gt;
While ( GUIStatus( $GUI ) ) &lt;br /&gt;
	DoEvents( ); &lt;br /&gt;
// This function is called when the button is clicked&lt;br /&gt;
Function myFunction()&lt;br /&gt;
{&lt;br /&gt;
	MsgBox(&amp;quot;Hello from the button&amp;quot;);&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make note however that the examples below do not include the SputnikOldGUI.dll in their scripts you must do that part yourself!.&lt;br /&gt;
&lt;br /&gt;
===== Dialog Creation Functions =====&lt;br /&gt;
* [[Core Function GUIMDICreate|GUICreate( &amp;quot;MDIWindow&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI Multi-Document-Interface window&lt;br /&gt;
* [[Core Function GUICreate|GUICreate( &amp;quot;Window&amp;quot;, &amp;lt;Text&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Style&amp;gt; )]] -- Create a GUI window&lt;br /&gt;
* [[Core Function DoEvents|DoEvents( )]] -- Keep GUI windows active by dispatching all messages in the queue&lt;br /&gt;
* [[Core Function GUILoad|GUILoad( &amp;lt;GUI Window&amp;gt; )]] -- Load a GUI window and display it (Usually after creation or after GUIUnload)&lt;br /&gt;
* [[Core Function GUIUnload|GUIUnload( &amp;lt;GUI Window&amp;gt; )]] -- Unload a GUI window and hide it (GUILoad will bring it back)&lt;br /&gt;
* [[Core Function GUIMDIParent|GUIMDIParent( &amp;lt;GUI Window&amp;gt;, &amp;lt;GUI Window&amp;gt; )]] -- Set the parent window (An MDI window) for another window to be created inside it&lt;br /&gt;
&lt;br /&gt;
===== Control Creation Functions =====&lt;br /&gt;
* [[Core Function GUICreateButton|GUICreate( &amp;quot;Button&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Button&lt;br /&gt;
* [[Core Function GUICreateDataGrid|GUICreate( &amp;quot;DataGrid&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DataGrid&lt;br /&gt;
* [[Core Function GUICreateTimer|GUICreate( &amp;quot;Timer&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Interval&amp;gt; )]] -- Create a Timer&lt;br /&gt;
* [[Core Function GUICreateComboBox|GUICreate( &amp;quot;ComboBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ComboBox&lt;br /&gt;
* [[Core Function GUICreateTextBox|GUICreate( &amp;quot;TextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TextBox&lt;br /&gt;
* [[Core Function GUICreateTextBoxEx|GUICreate( &amp;quot;TextBoxEx&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Multiline TextBox&lt;br /&gt;
* [[Core Function GUICreateLabel|GUICreate( &amp;quot;Label&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a Label&lt;br /&gt;
* [[Core Function GUICreateGroupBox|GUICreate( &amp;quot;GroupBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a GroupBox&lt;br /&gt;
* [[Core Function GUICreatePictureBox|GUICreate( &amp;quot;PictureBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a PictureBox&lt;br /&gt;
* [[Core Function GUICreateProgressBar|GUICreate( &amp;quot;ProgressBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ProgressBar&lt;br /&gt;
* [[Core Function GUICreateListBox|GUICreate( &amp;quot;ListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListBox&lt;br /&gt;
* [[Core Function GUICreateContextMenu|GUICreate( &amp;quot;ContextMenu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Context Menu which is used when right clicking the object&lt;br /&gt;
* [[Core Function GUICreateMenu|GUICreate( &amp;quot;Menu&amp;quot;, &amp;lt;gui object&amp;gt; )]] -- Create a Menu&lt;br /&gt;
* [[Core Function GUICreateMenuItem|GUICreate( &amp;quot;MenuItem&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt; )]] -- Create a MenuItem&lt;br /&gt;
* [[Core Function GUICreateTabSheet|GUICreate( &amp;quot;TabSheet&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabSheet&lt;br /&gt;
* [[Core Function GUICreateTabPage|GUICreate( &amp;quot;TabPage&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TabPage&lt;br /&gt;
* [[Core Function GUICreateRichTextBox|GUICreate( &amp;quot;RichTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RichTextBox&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Creates a source code editor textbox the same as the one used in the Sputnik IDE&lt;br /&gt;
* [[Core Function GUICreateCheckBox|GUICreate( &amp;quot;CheckBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckBox&lt;br /&gt;
* [[Core Function GUICreateRadioButton|GUICreate( &amp;quot;RadioButton&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a RadioButton&lt;br /&gt;
* [[Core Function GUICreateCodeBox|GUICreate( &amp;quot;CodeBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a textbox with syntax highlight and support for multiple and custom languages (Same thing Sputnik IDE uses)&lt;br /&gt;
* [[Core Function GUICreateHotkeyBox|GUICreate( &amp;quot;HotKeyBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a hotkeybox which a user can press a hotkey into it so you can make use of it&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function GUICreateDateTimePicker|GUICreate( &amp;quot;DateTimePicker&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a DateTimePicker&lt;br /&gt;
* [[Core Function GUICreateLinkLabel|GUICreate( &amp;quot;LinkLabel&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a LinkLabel&lt;br /&gt;
* [[Core Function GUICreateCheckedListBox|GUICreate( &amp;quot;CheckedListBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a CheckedListBox&lt;br /&gt;
* [[Core Function GUICreateListView|GUICreate( &amp;quot;ListView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ListView&lt;br /&gt;
* [[Core Function GUICreateMaskedTextBox|GUICreate( &amp;quot;MaskedTextBox&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MaskedTextBox&lt;br /&gt;
* [[Core Function GUICreateMonthCalendar|GUICreate( &amp;quot;MonthCalendar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a MonthCalendar&lt;br /&gt;
* [[Core Function GUICreateNumericUpDown|GUICreate( &amp;quot;NumericUpDown&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a NumericUpDown&lt;br /&gt;
* [[Core Function GUICreateToolTip|GUICreate( &amp;quot;ToolTip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Text&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolTip&lt;br /&gt;
* [[Core Function GUICreateTreeView|GUICreate( &amp;quot;TreeView&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a TreeView&lt;br /&gt;
* [[Core Function GUICreateWebBrowser|GUICreate( &amp;quot;WebBrowser&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a WebBrowser&lt;br /&gt;
* [[Core Function GUICreateStatusBar|GUICreate( &amp;quot;StatusBar&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a StatusBar&lt;br /&gt;
* [[Core Function GUICreateToolStrip|GUICreate( &amp;quot;ToolStrip&amp;quot;, &amp;lt;gui object&amp;gt;, &amp;lt;Left&amp;gt;, &amp;lt;Top&amp;gt;, &amp;lt;Width&amp;gt;, &amp;lt;Height&amp;gt; )]] -- Create a ToolStrip&lt;br /&gt;
&lt;br /&gt;
===== Window/Control Properties Get/Set Functions =====&lt;br /&gt;
&lt;br /&gt;
Note - Any options not here are most likely found using GUIGetProp and GUISetProp the bulk of all props can be found/used in them 2 funtions however anything special and not generic will go in the functions below.&lt;br /&gt;
&lt;br /&gt;
* [[Core Function GUIWindow|GUIWindow( &amp;lt;window&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Windows&lt;br /&gt;
* [[Core Function GUIRichTextBox|GUIRichTextBox( &amp;lt;richtextbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RichTextBox&lt;br /&gt;
* [[Core Function GUIDataGrid|GUIDataGrid( &amp;lt;datagrid&amp;gt; )]] -- Properties &amp;amp; Functions specifically for DataGrid&lt;br /&gt;
* [[Core Function GUITimer|GUITimer( &amp;lt;timer&amp;gt; )]] -- Properties &amp;amp; Functions specifically for Timer&lt;br /&gt;
* [[Core Function GUICodeBox|GUIComboBox( &amp;lt;codebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CodeBox&lt;br /&gt;
* [[Core Function GUIComboBox|GUIComboBox( &amp;lt;combobox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ComboBox&lt;br /&gt;
* [[Core Function GUICheckBox|GUICheckBox( &amp;lt;checkbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for CheckBox&lt;br /&gt;
* [[Core Function GUIRadioButton|GUIRadioButton( &amp;lt;radiobutton&amp;gt; )]] -- Properties &amp;amp; Functions specifically for RadioButton&lt;br /&gt;
* [[Core Function GUIHotkeyBox|GUIHotkeyBox( &amp;lt;hotkeybox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for HotkeyBox&lt;br /&gt;
* [[Core Function GUIListBox|GUIListBox( &amp;lt;listbox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ListBox&lt;br /&gt;
* [[Core Function GUITabSheet|GUITabSheet( &amp;lt;tabsheet&amp;gt; )]] -- Properties &amp;amp; Functions specifically for TabSheet&lt;br /&gt;
* [[Core Function GUIProgressBar|GUIProgressBar( &amp;lt;progressbar&amp;gt; )]] -- Properties &amp;amp; Functions specifically for ProgressBar&lt;br /&gt;
* [[Core Function GUIPictureBox|GUIPictureBox( &amp;lt;picturebox&amp;gt; )]] -- Properties &amp;amp; Functions specifically for PictureBox&lt;br /&gt;
* [[Core Function GUIMsgFilter|GUIMsgFilter( &amp;lt;gui object&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all messages windows sends to the GUI object (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
* [[Core Function GUIWndProc|GUIWndProc( &amp;lt;gui&amp;gt;, &amp;lt;command&amp;gt; )]] -- Use a function to receive all the WindProc messages windows sends to the GUI window (HWND, MSG, WPARAM, LPARAM).&lt;br /&gt;
&lt;br /&gt;
===== Common Dialog/Control Properties Get/Set Functions =====&lt;br /&gt;
* [[Core Function GUIGetProp|GUIGetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt; )]] -- Get the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUISetProp|GUISetProp( &amp;lt;gui object&amp;gt;, &amp;lt;prop&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set the value of a GUI objects property&lt;br /&gt;
* [[Core Function GUIGetPropList|GUIGetPropList( &amp;lt;gui object&amp;gt;, &amp;lt;searchfor&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Get an array of the the names and types of all compatible/incompatible/all properties that the GUI object offers&lt;br /&gt;
&lt;br /&gt;
===== GUI Link (Event) Functions =====&lt;br /&gt;
* [[Core Function GUILink|GUILink( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt;, &amp;lt;action&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Add an event (link) to a GUI object such as Click, MouseDown etc&lt;br /&gt;
* [[Core Function GUILinkValid|GUILinkValid( &amp;lt;gui object&amp;gt;, &amp;lt;linktype&amp;gt; )]] -- Check if a given event (link) is valid for the given GUI object&lt;br /&gt;
&lt;br /&gt;
===== Graphics/Pixel Functions =====&lt;br /&gt;
* [[Core Function Colour|Colour( &amp;lt;name&amp;gt; )]] -- Get the colour INT value of a given colours name&lt;br /&gt;
* [[Core Function ColourDialog|ColourDialog( )]] -- Allows the user to select a colour and allows you to get the RED, GREEN, BLUE etc values&lt;br /&gt;
* [[Core Function FontDialog|FontDialog( &amp;lt;font&amp;gt; )]] -- Allows the user to select a font and allows you to get the Name, size, bold etc values&lt;br /&gt;
&lt;br /&gt;
===== Bitmap Functions =====&lt;br /&gt;
* [[Core Function BitmapCreate|BitmapCreate( &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt; )]] -- Create a new blank bitmap object&lt;br /&gt;
* [[Core Function BitmapGetPixel|BitmapGetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Get a pixel on a bitmap object&lt;br /&gt;
* [[Core Function BitmapSetPixel|BitmapSetPixel( &amp;lt;bitmap&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;colour&amp;gt; )]] -- Alter a pixel on a bitmap object&lt;br /&gt;
&lt;br /&gt;
===== Other GUI Functions =====&lt;br /&gt;
* [[Core Function GUIStatus|GUIStatus( &amp;lt;gui window&amp;gt; )]] -- Check if a GUI window is loaded or unloaded&lt;br /&gt;
* [[Core Function GUIHideCaret|GUIHideCaret( &amp;lt;gui object&amp;gt; )]] -- Hide the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIShowCaret|GUIShowCaret( &amp;lt;gui object&amp;gt; )]] -- Show the caret in a GUI object&lt;br /&gt;
* [[Core Function GUIRedraw|GUIRedraw( &amp;lt;gui object&amp;gt; )]] -- Redraw the object&lt;br /&gt;
* [[Core Function GUICreateFont|GUICreate( &amp;quot;Font&amp;quot;, &amp;lt;name&amp;gt;, &amp;lt;size&amp;gt;, &amp;lt;flags&amp;gt; )]] -- Create a Font&lt;br /&gt;
* [[Core Function MsgBox|MsgBox( &amp;lt;message&amp;gt;, &amp;lt;title&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Show a message dialog&lt;br /&gt;
* [[Core Function InputBox|InputBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input text&lt;br /&gt;
* [[Core Function InputBoxEx|InputBoxEx( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;default text&amp;gt; )]] -- Shows a box to input multiple lines of text&lt;br /&gt;
* [[Core Function ChoiceBox|ChoiceBox( &amp;lt;title&amp;gt;, &amp;lt;message&amp;gt;, &amp;lt;options&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows a window with choices for the user to pick from either none/one or many choices can be allowed&lt;br /&gt;
* [[Core Function ToolTip|ToolTip( &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Creates a tooltip anywhere on the screen&lt;br /&gt;
* [[Core Function ToolTipKill|ToolTipKill( &amp;lt;ToolTip&amp;gt; )]] -- Delete a tooltip that was made using ToolTip()&lt;br /&gt;
* [[Core Function PSet|PSet( &amp;lt;gui object&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;object&amp;gt; )]] -- Draw at a pixel&lt;br /&gt;
* [[Core Function GUISendToBack|GUISendToBack( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the back of the ZOrder&lt;br /&gt;
* [[Core Function GUIBringToFront|GUIBringToFront( &amp;lt;gui object&amp;gt; )]] -- Send a GUI object to the front of the ZOrder&lt;br /&gt;
&lt;br /&gt;
===== Variable Type Checking etc =====&lt;br /&gt;
* [[Core Function isVarGUIObject|isVarGUIObject( $variable )]] -- Check if a variable holds a GUI Object&lt;br /&gt;
* [[Core Function GetVarGUIObjType|GetVarGUIObjType( $variable )]] -- Get the common object type of a variable (If it is a GUI object)&lt;br /&gt;
&lt;br /&gt;
==== Keyboard Control Functions ====&lt;br /&gt;
* [[Core Function HotKeySet|HotKeySet( &amp;lt;keydef&amp;gt;, &amp;lt;expression&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Create a custom hotkey to run custom code or execute a function&lt;br /&gt;
* [[Core Function SendKeys|SendKeys( &amp;lt;keydef&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Sends simulated keystrokes to the active window&lt;br /&gt;
* [[Core Function RealGetKeyState|RealGetKeyState( &amp;lt;vk_keycode/expression&amp;gt; )]] -- Checks if a key or series of keys is pressed down&lt;br /&gt;
* [[Core Function KeyHook|KeyHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide Keyhook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Mouse Control Functions ====&lt;br /&gt;
* [[Core Function MouseClick|MouseClick ( &amp;lt;button&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click operation&lt;br /&gt;
* [[Core Function MouseClickDrag|MouseClickDrag ( &amp;lt;button&amp;gt;, &amp;lt;x1&amp;gt;, &amp;lt;y1&amp;gt;, &amp;lt;x2&amp;gt;, &amp;lt;y2&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Perform a mouse click and drag operation&lt;br /&gt;
* [[Core Function MouseDown|MouseDown ( &amp;lt;button&amp;gt; )]] -- Perform a mouse down event at the current mouse position&lt;br /&gt;
* [[Core Function MouseUp|MouseUp ( &amp;lt;button&amp;gt; )]] -- Perform a mouse up event at the current mouse position&lt;br /&gt;
* [[Core Function MouseMove|MouseMove ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves the mouse pointer&lt;br /&gt;
* [[Core Function MouseGetPos|MouseGetPos ( )]] -- Retrieves the current position of the mouse cursor&lt;br /&gt;
* [[Core Function MouseWheel|MouseWheel ( &amp;lt;direction&amp;gt;, &amp;lt;clicks&amp;gt; )]] -- Moves the mouse wheel up or down&lt;br /&gt;
* [[Core Function MouseHook|MouseHook( &amp;lt;name&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;param var&amp;gt; )]] -- Places a global system wide MouseHook with callback to a function or command&lt;br /&gt;
&lt;br /&gt;
==== Window Management Functions ====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function WinActivate|WinActivate ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Activates (gives focus to) a window&lt;br /&gt;
* [[Core Function WinActive|WinActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists and is currently active&lt;br /&gt;
* [[Core Function WinExists|WinExists ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Checks to see if a specified window exists&lt;br /&gt;
* [[Core Function WinGetClassList|WinGetClassList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the classes from a window&lt;br /&gt;
* [[Core Function WinGetHandle|WinGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the internal handle of a window&lt;br /&gt;
* [[Core Function WinGetPos|WinGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the position and size of a given window&lt;br /&gt;
* [[Core Function WinGetCaretPos|WinGetCaretPos ( )]] -- Returns the coordinates of the caret in the foreground window&lt;br /&gt;
* [[Core Function WinGetTitle|WinGetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the full title from a window&lt;br /&gt;
* [[Core Function WinGetText|WinGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the text from a window&lt;br /&gt;
* [[Core Function WinGetState|WinGetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the state of a given window&lt;br /&gt;
* [[Core Function WinGetProcess|WinGetProcess ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the Process ID (PID) associated with a window&lt;br /&gt;
* [[Core Function WinGetClientSize|WinGetClientSize ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves the size of a given window's client area&lt;br /&gt;
* [[Core Function WinClose|WinClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Closes a window&lt;br /&gt;
* [[Core Function WinKill|WinKill ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Forces a window to close&lt;br /&gt;
* [[Core Function WinMove|WinMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves and/or resizes a window&lt;br /&gt;
* [[Core Function WinWait|WinWait ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window exists&lt;br /&gt;
* [[Core Function WinWaitActive|WinWaitActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is active&lt;br /&gt;
* [[Core Function WinWaitNotActive|WinWaitNotActive ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits  until the requested window is not active&lt;br /&gt;
* [[Core Function WinWaitClose|WinWaitClose ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;timeout&amp;gt; )]] -- Waits until the requested window does not exist&lt;br /&gt;
* [[Core Function WinSetTitle|WinSetTitle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;newtitle&amp;gt; )]] -- Changes the title of a window&lt;br /&gt;
* [[Core Function WinSetState|WinSetState ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Shows, hides, minimizes, maximizes, or restores a window&lt;br /&gt;
* [[Core Function WinSetTrans|WinSetTrans ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;transparency&amp;gt; )]] -- Sets the transparency of a window&lt;br /&gt;
* [[Core Function WinMinimizeAll|WinMinimizeAll  ( )]] -- Minimizes all windows&lt;br /&gt;
* [[Core Function WinMinimizeAllUndo|WinMinimizeAllUndo ( )]] -- Undoes a previous WinMinimizeAll function&lt;br /&gt;
* [[Core Function WinFlash|WinFlash ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;flashes&amp;gt;, &amp;lt;delay&amp;gt; )]] -- Flashes a window in the taskbar&lt;br /&gt;
* [[Core Function WinMenuSelectItem|WinMenuSelectItem( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;item&amp;gt;, &amp;lt;subitems&amp;gt; ... )]] -- Invokes a menu item of a window&lt;br /&gt;
* [[Core Function WinList|WinList ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Retrieves a list of windows&lt;br /&gt;
&lt;br /&gt;
===== Controls =====&lt;br /&gt;
(For info on using &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )&lt;br /&gt;
&lt;br /&gt;
* [[Core Function ControlClick|ControlClick ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;button&amp;gt;, &amp;lt;clicks&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Sends a mouse click command to a given control&lt;br /&gt;
* [[Core Function ControlSend|ControlSend ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;string&amp;gt; &amp;lt;flag&amp;gt; )]] -- Sends a string of characters to a control&lt;br /&gt;
* [[Core Function ControlGetFocus|ControlGetFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt; )]] -- Returns the ControlRef# of the control that has keyboard focus within a specified window&lt;br /&gt;
* [[Core Function ControlGetPos|ControlGetPos ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the position and size of a control relative to it's window&lt;br /&gt;
* [[Core Function ControlDisable|ControlDisable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Disables a control&lt;br /&gt;
* [[Core Function ControlEnable|ControlEnable ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Enables a control&lt;br /&gt;
* [[Core Function ControlShow|ControlShow ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Shows a control that was hidden&lt;br /&gt;
* [[Core Function ControlHide|ControlHide ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Hides a control&lt;br /&gt;
* [[Core Function ControlGetText|ControlGetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves text from a control&lt;br /&gt;
* [[Core Function ControlSetText|ControlSetText ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;text&amp;gt; )]] -- Sets text of a control&lt;br /&gt;
* [[Core Function ControlMove|ControlMove ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt;, &amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;, &amp;lt;speed&amp;gt; )]] -- Moves a control within a window&lt;br /&gt;
* [[Core Function ControlGetHandle|ControlGetHandle ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Retrieves the internal handle of a control&lt;br /&gt;
* [[Core Function ControlFocus|ControlFocus ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt; )]] -- Sets input focus to a given control on a window&lt;br /&gt;
&lt;br /&gt;
====== NOT AVAILABLE YET ======&lt;br /&gt;
* [[Core Function ControlCommand|ControlCommand ( &amp;lt;title&amp;gt;, &amp;lt;text&amp;gt;, &amp;lt;controlID&amp;gt;, &amp;lt;command&amp;gt;, &amp;lt;option&amp;gt; )]] -- Sends a command to a control&lt;br /&gt;
&lt;br /&gt;
==== Graphics/Pixel Functions ====&lt;br /&gt;
* [[Core Function PixelGetColour|PixelGetColour ( &amp;lt;x&amp;gt;, &amp;lt;y&amp;gt; )]] -- Returns a pixel colour according to x, y pixel coordinates&lt;br /&gt;
* [[Core Function PixelGetMouse|PixelGetMouse ( )]] -- Returns a pixel colour according to x, y position of the mouse pointer&lt;br /&gt;
* [[Core Function PixelSearch|PixelSearch ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelSearchHWND|PixelSearchHWND ( &amp;lt;hwnd&amp;gt;, &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;colour&amp;gt;, &amp;lt;shade&amp;gt;, &amp;lt;padding&amp;gt;, &amp;lt;step&amp;gt; )]] -- Searches a rectangle of pixels for the pixel colour provided&lt;br /&gt;
* [[Core Function PixelChecksum|PixelChecksum ( &amp;lt;left&amp;gt;, &amp;lt;top&amp;gt;, &amp;lt;right&amp;gt;, &amp;lt;bottom&amp;gt;, &amp;lt;step&amp;gt;, &amp;lt;hwnd&amp;gt; )]] -- Generates a checksum for a region of pixels&lt;br /&gt;
* [[Core Function RGB|RGB( &amp;lt;red&amp;gt;, &amp;lt;green&amp;gt;, &amp;lt;blue&amp;gt; )]] -- Get the colour INT value of given red, green and blue bytes&lt;br /&gt;
* [[Core Function GetRValue|GetRValue( &amp;lt;colour&amp;gt; )]] -- Get the red byte from a colour INT value&lt;br /&gt;
* [[Core Function GetGValue|GetGValue( &amp;lt;colour&amp;gt; )]] -- Get the green byte from a colour INT value&lt;br /&gt;
* [[Core Function GetBValue|GetBValue( &amp;lt;colour&amp;gt; )]] -- Get the blue byte from a colour INT value&lt;br /&gt;
&lt;br /&gt;
==== Sputnik Plugins (Using .NET DLLs) ====&lt;br /&gt;
* [[Core Function Use|Use( &amp;lt;name/array&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Define a .NET assemblies namespace + full qualified name for use in creating .NET objects or define a Sputnik plugin to load&lt;br /&gt;
* [[Core Function Unuse|Unuse( &amp;lt;name&amp;gt; )]] -- Remove a .NET namespace from Sputniks search group (Added by Use() function)&lt;br /&gt;
&lt;br /&gt;
==== Control Flow Functions ====&lt;br /&gt;
* [[Core Function Return|Return &amp;lt;expressions&amp;gt;]] -- Immediately ends execution of the current function, and returns its argument as the value of the function call. return will also end the execution of an Eval() statement or script file&lt;br /&gt;
* [[Core Function Throw|Throw( &amp;lt;expression&amp;gt; )]] -- Throw an exception&lt;br /&gt;
* [[Core Function Die|Die( &amp;lt;expression&amp;gt; )]] -- Gives an error and terminates the program&lt;br /&gt;
* [[Core Function Break|Break( &amp;lt;scopes&amp;gt; )]] -- Ends execution of the current loop&lt;br /&gt;
* [[Core Function Continue|Continue( &amp;lt;scopes&amp;gt; )]] -- Continue the execution of a loop at its next iteration&lt;br /&gt;
* [[Core Function Redo|Redo( )]] -- Continue the execution of a loop at the start of the current iteration&lt;br /&gt;
&lt;br /&gt;
==== Internal Class Management and Information ====&lt;br /&gt;
* [[Core Function ClassExists|ClassExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Class exists&lt;br /&gt;
* [[Core Function ClassList|ClassList( &amp;lt;expression&amp;gt;, &amp;lt;inherits&amp;gt; )]] -- Return an array of all user defined classes (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function ClassInfo|ClassInfo( &amp;lt;class-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a class and its functions, properties and so on&lt;br /&gt;
* [[Core Function ClassStack|ClassStack( &amp;lt;variable&amp;gt; )]] -- Return a reference to a classes internal variable stack (as an array) (or set the class stack from an existing array)&lt;br /&gt;
* [[Core Function ClassName|ClassName( &amp;lt;variable&amp;gt; )]] -- Return the name of the class on a variable or a class this code is running inside of (automatically uses $this if no param is given)&lt;br /&gt;
* [[Core Function UnsetClass|UnsetClass( &amp;lt;class-name&amp;gt; )]] -- Delete a previous user defined Class from Sputnik&lt;br /&gt;
* [[Core Function New|New( &amp;lt;classConstruction&amp;gt; )]] -- Create a new instance of a given class name optionally with parameters to be sent to the __Construct function of the new class&lt;br /&gt;
* [[Core Function NewClass|newClass( &amp;lt;name&amp;gt;, &amp;lt;params&amp;gt; )]] -- Create a new instance of a class by its name as a string&lt;br /&gt;
* [[Core Function NewClassFromArray|NewClassFromArray( &amp;lt;name&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and an array of its values&lt;br /&gt;
* [[Core Function ConvertClass|ConvertClass( &amp;lt;oldClass&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;wakeUp&amp;gt; )]] -- Create a new instance of a class by its name and copy the values from another class&lt;br /&gt;
* [[Core Function IsOverloaded|IsOverloaded( &amp;lt;class&amp;gt;, &amp;lt;overload&amp;gt; )]] -- Check if a given cast/operator overload exists within a class&lt;br /&gt;
&lt;br /&gt;
==== Internal Function Management and Information ====&lt;br /&gt;
* [[Core Function FunctionExists|FunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Function exists&lt;br /&gt;
* [[Core Function FunctionList|FunctionList( &amp;lt;expression&amp;gt;, &amp;lt;class&amp;gt; )]] -- Return an array of all user defined functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function FunctionInfo|FunctionInfo( &amp;lt;function-name&amp;gt; )]] -- Get a vast amount of *behind the scene* information on a function&lt;br /&gt;
* [[Core Function UnsetFunction|UnsetFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a previous user defined Function from Sputnik&lt;br /&gt;
* [[Core Function UnsetCoreFunction|UnsetCoreFunction( &amp;lt;function-name&amp;gt; )]] -- Delete a core function from Sputnik&lt;br /&gt;
* [[Core Function CoreFunctionExists|CoreFunctionExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Core Function exists&lt;br /&gt;
* [[Core Function CoreFunctionList|CoreFunctionList( &amp;lt;expression&amp;gt; )]] -- Return an array of all core functions (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function Eval|Eval( &amp;lt;expression&amp;gt;, &amp;lt;flag&amp;gt;, &amp;lt;cleanup&amp;gt;, &amp;lt;printToReturn&amp;gt; )]] -- Evaluate a string as Sputnik code&lt;br /&gt;
* [[Core Function MKFunc|MKFunc(&amp;lt;params&amp;gt;, &amp;lt;body&amp;gt;)]] -- Create a user defined function to be called from a variable&lt;br /&gt;
* [[Core Function CallFunc|CallFunc( &amp;lt;function&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a user defined function contained in a variable&lt;br /&gt;
* [[Core Function Call|Call(&amp;lt;function/array&amp;gt;, &amp;lt;expressions&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
* [[Core Function CallArray|CallArray( &amp;lt;function/array&amp;gt;, &amp;lt;array&amp;gt;)]] -- Calls a function contained in a string parameter&lt;br /&gt;
&lt;br /&gt;
==== Internal Enum Management and Information ====&lt;br /&gt;
* [[Core Function EnumExists|EnumExists( &amp;lt;expression&amp;gt; )]] -- Check if a given Enum exists&lt;br /&gt;
* [[Core Function EnumList|EnumList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined enums (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetEnum|UnsetEnum( &amp;lt;enum-name&amp;gt; )]] -- Delete a previous user defined Enum from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLImport Management and Information ====&lt;br /&gt;
* [[Core Function DLLImportExists|DLLImportExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLImport exists&lt;br /&gt;
* [[Core Function DLLImportList|DLLImportList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllimports (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLImport|UnsetDLLImport( &amp;lt;dllimport-function-name&amp;gt; )]] -- Delete a function imported using the DLLImport() function&lt;br /&gt;
&lt;br /&gt;
==== Internal DLLStruct Management and Information ====&lt;br /&gt;
* [[Core Function DLLStructExists|DLLStructExists( &amp;lt;expression&amp;gt; )]] -- Check if a given DLLStruct exists&lt;br /&gt;
* [[Core Function DLLStructList|DLLStructList( &amp;lt;expression&amp;gt; )]] -- Return an array of all user defined dllstructs (Or just ones fitting a given pattern)&lt;br /&gt;
* [[Core Function UnsetDLLStruct|UnsetDLLStruct( &amp;lt;dllstruct-name&amp;gt; )]] -- Delete a previous user defined DLLStruct from Sputnik&lt;br /&gt;
&lt;br /&gt;
==== Internal Variable/Scope Information ====&lt;br /&gt;
* [[Core Function VarList|VarList( &amp;lt;varScope/class&amp;gt; )]] -- Obtain information on all variables that exist in a given scope or class&lt;br /&gt;
* [[Core Function VarTypeToString|VarTypeToString( &amp;lt;varType&amp;gt; )]] -- Convert a raw variable type into it's string representation&lt;br /&gt;
* [[Core Function VarTypeFromString|VarTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarObjTypeToString|VarObjTypeToString( &amp;lt;varObjType&amp;gt; )]] -- Convert a raw variable object type into it's string representation&lt;br /&gt;
* [[Core Function VarObjTypeFromString|VarObjTypeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable object type from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function VarScopeToString|VarScopeToString( &amp;lt;varScope&amp;gt; )]] -- Convert a raw variable scope into it's string representation&lt;br /&gt;
* [[Core Function VarScopeFromString|VarScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a variable scope from it's string representation into it's raw type&lt;br /&gt;
* [[Core Function ScopeToString|ScopeToString( &amp;lt;scope&amp;gt; )]] -- Convert a raw scope into it's string representation&lt;br /&gt;
* [[Core Function ScopeFromString|ScopeFromString( &amp;lt;string&amp;gt; )]] -- Convert a scope from it's string representation into it's raw type&lt;br /&gt;
&lt;br /&gt;
==== Eval Functions ====&lt;br /&gt;
* [[Core Function EvalSyntax|EvalSyntax( &amp;lt;expression&amp;gt; )]] -- Evaluate a string as Sputnik code but only check if it's syntax is valid&lt;br /&gt;
* [[Core Function EvalCreate|EvalCreate( )]] -- Create an Eval object for use with Eval()&lt;br /&gt;
* [[Core Function EvalSet|EvalSet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Set a variable inside an Eval Object&lt;br /&gt;
* [[Core Function EvalGet|EvalGet( &amp;lt;evalObject&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;value&amp;gt; )]] -- Get a from variable inside an Eval Object&lt;br /&gt;
&lt;br /&gt;
==== Misc Functions ====&lt;br /&gt;
* [[Core Function Exit|Exit( &amp;lt;exitCode&amp;gt; )]] -- Instantly terminate the program/script&lt;br /&gt;
* [[Core Function Assert|Assert( &amp;lt;toCheck&amp;gt;, &amp;lt;errorMsg&amp;gt; )]] -- Check if value is true (if so returns it) if it is not then an exception is thrown with a default or user provided (second argument) error message&lt;br /&gt;
* [[Core Function Warn|Warn( &amp;lt;message&amp;gt; )]] -- Show a warning message with source file name and line number&lt;br /&gt;
* [[Core Function Clone|Clone( &amp;lt;object&amp;gt; )]] -- Create a clone of a clone-able object&lt;br /&gt;
* [[Core Function LineInfo|LineInfo( )]] -- Get a vast amount of *behind the scene* information the current line of source code being executed&lt;br /&gt;
* [[Core Function GC|GC( &amp;lt;flag&amp;gt; )]] -- Use the garbage collector&lt;br /&gt;
* [[Core Function HWND|HWND( )]] -- Get the HWND of the hidden window used by this program (It handles hotkeys etc)&lt;br /&gt;
* [[Core Function Require|Require( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use&lt;br /&gt;
* [[Core Function Include|Include( &amp;lt;file&amp;gt;, &amp;lt;flag&amp;gt; )]] -- Add all functions etc from a file for use and execute all expressions&lt;br /&gt;
* [[Core Function Opt|Opt( &amp;lt;option&amp;gt;, &amp;lt;value&amp;gt; )]] -- Changes the operation of various Sputnik functions/parameters&lt;br /&gt;
* [[Core Function IsAdmin|IsAdmin( )]] -- Check if the script is running in admin mode or not (Run as administrator)&lt;br /&gt;
* [[Core Function ObjToVar|ObjToVar( &amp;lt;variable&amp;gt; )]] -- Convert a $variable's object to its compatible $variable data type&lt;br /&gt;
* [[Core Function VarToObj|VarToObj( &amp;lt;variable&amp;gt; )]] -- Convert a $variable to its compatible object (such as .NET base object)&lt;br /&gt;
&lt;br /&gt;
=== User Defined Functions ===&lt;br /&gt;
&lt;br /&gt;
These functions are created using Sputnik and are not part of the Sputnik core language.&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-20T10:17:10Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Enum (Embedding ) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two variants they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used a a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
To access the raw memory of a string and physically see its null terminator you must use the Fixed() statement or cast the string as a char* the same as in C here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello World!&amp;quot;;&lt;br /&gt;
// Create a pointer to the strings&lt;br /&gt;
// physical memory and place it in&lt;br /&gt;
// $p&lt;br /&gt;
fixed( $p = $str )&lt;br /&gt;
{&lt;br /&gt;
	// Loop through each character in the string&lt;br /&gt;
	// until the null terminator is hit then stop&lt;br /&gt;
	while( (my $c = (char)*$p++) != @'\0' )&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Character '%c' as decimal '%d' as hex '%x'\n&amp;quot;, $c, $c, $c);&lt;br /&gt;
	}&lt;br /&gt;
	// The fact that it actually stops is proof&lt;br /&gt;
	// the null terminator exists&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Character 'H' as decimal '72' as hex '48'&lt;br /&gt;
// Character 'e' as decimal '101' as hex '65'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character ' ' as decimal '32' as hex '20'&lt;br /&gt;
// Character 'W' as decimal '87' as hex '57'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character 'r' as decimal '114' as hex '72'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'd' as decimal '100' as hex '64'&lt;br /&gt;
// Character '!' as decimal '33' as hex '21'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will be automatically expanded to the size you request all the elements in the gap that it fills in will be empty strings ready for use (As seen in index 98).&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support static variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Def $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE def it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a static DEF variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// DEF variable&lt;br /&gt;
Def $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Def to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Def is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Defs should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Language_Reference"/>
				<updated>2015-09-20T10:16:56Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Enum */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Datatypes ===&lt;br /&gt;
&lt;br /&gt;
==== Brief ====&lt;br /&gt;
&lt;br /&gt;
In Sputnik there is only one datatype called an SV. A SV can be numeric or string data (And more advanced arrays/hashes/objects/classes) and decides how to use the data depending on the situation it is being used in.  For example, if you try and multiply two SV variables they will be treated as numbers, if you try and concatenate (join) two variants they will be treated as strings.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100; // equals the number 100 &lt;br /&gt;
&lt;br /&gt;
$var = 100 * 20; // equals the number 2000 &lt;br /&gt;
&lt;br /&gt;
$var = 100 + (100 / 2); // equals the number 150&lt;br /&gt;
&lt;br /&gt;
$var = 10 . 20; // equals the string &amp;quot;1020&amp;quot; (. is used to join strings) &lt;br /&gt;
&lt;br /&gt;
$var = 10 * &amp;quot;omg&amp;quot;; // equals 0 since if a string is used as a number, it will be converted to a number; If it doesn't contain a valid number, it will be assumed to equal 0.&lt;br /&gt;
&lt;br /&gt;
// Example of variable conversions.....&lt;br /&gt;
10 / 20 // This action will two Int64 and they will remain Int64s&lt;br /&gt;
10 / 20.0 // We have defined one of them as a double so it will convert them both to a double when it does the conversion&lt;br /&gt;
// What this means is if you want to make sure your math is indeed using doubles add the . to it such 20.0&lt;br /&gt;
// Why? Consider this &amp;quot;$y = 1 % 3/4;&amp;quot; it wil return NaN ie fail... But if we do &amp;quot;$y = 1 % 3.0/4.0;&amp;quot; it will work as expected.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers can be standard decimal numbers like 2, 4.566, and -7.  &lt;br /&gt;
&lt;br /&gt;
Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500.  &lt;br /&gt;
&lt;br /&gt;
Signed Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
Unsigned Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x and ending with U as in 0x409U or 0x4fffU (when using hex notation only 32-bit/64-bit integers numbers are valid not floats/doubles).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Octal numbers if you place a 0 before the number such as 077 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Octal numbers if you place a 0 before the number and a U after it such as 077U (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Signed Binary numbers if you place a 0b before the number such as 0b101 this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
You can use Unsigned Binary numbers if you place a 0b before the number and a U after it such as 0b101U this will produce the number 5 (only applies if there is no decimal point).&lt;br /&gt;
&lt;br /&gt;
==== Characters ====&lt;br /&gt;
&lt;br /&gt;
A character is just a single letter/number etc there are a many ways to give a variable a character data type here are a few:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = (char)'A';&lt;br /&gt;
$a = char('A');&lt;br /&gt;
$a = (char)65;&lt;br /&gt;
$a = (char)0x41;&lt;br /&gt;
$a = @'A';&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like strings it is possible to do an escape for the character (see below for list of escapes) example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = @'\0'; // Create a null char to be used a a null terminator or something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Sputniks strings are ALL UNICODE you can only print UNICODE specific symbols to the console if you change the front to Consolas or something.&lt;br /&gt;
&lt;br /&gt;
Strings are enclosed in double-quotes like &amp;quot;this&amp;quot;. If you want a string to actually contain a double-quote use it twice like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// &amp;quot;This type of string is parsed for escapes&amp;quot;&lt;br /&gt;
// 'This type of string is static and is never parsed'&lt;br /&gt;
// qq(This type of string is parsed for escapes)&lt;br /&gt;
// qq/This type of string is parsed for escapes/&lt;br /&gt;
// qq{This type of string is parsed for escapes}&lt;br /&gt;
// qq~This type of string is parsed for escapes~&lt;br /&gt;
// qq%This type of string is parsed for escapes%&lt;br /&gt;
// qq:This type of string is parsed for escapes:&lt;br /&gt;
// qq^This type of string is parsed for escapes^&lt;br /&gt;
// qq?This type of string is parsed for escapes?&lt;br /&gt;
// qq¬This type of string is parsed for escapes¬&lt;br /&gt;
// q(This type of string is static and is never parsed)&lt;br /&gt;
// q/This type of string is static and is never parsed/&lt;br /&gt;
// q{This type of string is static and is never parsed}&lt;br /&gt;
// q~This type of string is static and is never parsed~&lt;br /&gt;
// q%This type of string is static and is never parsed%&lt;br /&gt;
// q:This type of string is static and is never parsed:&lt;br /&gt;
// q^This type of string is static and is never parsed^&lt;br /&gt;
// q?This type of string is static and is never parsed?&lt;br /&gt;
// q¬This type of string is static and is never parsed¬&lt;br /&gt;
// @&amp;quot;This type of string is also never parsed&amp;quot;&lt;br /&gt;
//&lt;br /&gt;
// When it comes to q, qq you pick the one that suits your needs&lt;br /&gt;
// if the large block you are making into a string does not contain&lt;br /&gt;
// a ^ then use qq^ string goes inside here  ^ etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$var = &amp;quot;here is a \&amp;quot;double-quote\&amp;quot; - ok?&amp;quot;; // the \n is an escape charactor to cause a special symbol to be placed inside a string in this case it will place a double quote &amp;quot; inside a string.&lt;br /&gt;
&lt;br /&gt;
You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want.  For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them:&lt;br /&gt;
&lt;br /&gt;
'This &amp;quot;sentence&amp;quot; contains &amp;quot;lots&amp;quot; of &amp;quot;double-quotes&amp;quot; does it not?'&lt;br /&gt;
&lt;br /&gt;
However if you choose to use '' to define your strings and then you want to place a ' inside the string it must be done like this:&lt;br /&gt;
&lt;br /&gt;
'Hello ''this'' is my string'&lt;br /&gt;
&lt;br /&gt;
In this case '' is used to place a ' inside a string made of '' chars.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;quot; strings can place variables inside them for example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Arrays:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[77] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And Hashes:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Hello the variable is $val[test] ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Warning - Strings made using 'string' are STATIC this means you cannot place variables inside the string like you can with a regular &amp;quot;string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note - &amp;quot;&amp;quot; string allows escapes such as \n to form newline however '' (static) strings do not resolve escapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
Escape Sequence		Represents&lt;br /&gt;
\$			Dollar sign&lt;br /&gt;
\@			At Sign&lt;br /&gt;
\a			Bell (alert)&lt;br /&gt;
\b			Backspace&lt;br /&gt;
\f			Formfeed&lt;br /&gt;
\n			New line&lt;br /&gt;
\m			New line or &amp;lt;BR&amp;gt; depending if #CGI has been set&lt;br /&gt;
\r			Carriage return&lt;br /&gt;
\t			Horizontal tab&lt;br /&gt;
\v			Vertical tab&lt;br /&gt;
\s			Space&lt;br /&gt;
\'			Single quotation mark&lt;br /&gt;
\&amp;quot;			Double quotation mark&lt;br /&gt;
\\			Backslash&lt;br /&gt;
\?			Literal question mark&lt;br /&gt;
\xhh			ASCII character in hexadecimal notation (Expects 2 digits)&lt;br /&gt;
\xhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\ohhh			ASCII character in octal notation (Expects 3 digits)&lt;br /&gt;
\uhhhh			UNICODE character in hexadecimal notation (Expects 4 digits)&lt;br /&gt;
\Uhhhhhhhh		UNICODE character in hexadecimal notation (Expects 8 digits first four must be 0000)&lt;br /&gt;
\x{h*}			ASCII/UNICODE character in hexadecimal notation (Accepts any valid amount of digits)&lt;br /&gt;
\o{h*}			ASCII/UNICODE character in octal notation (Accepts any valid amount of digits)&lt;br /&gt;
\C			The following characters become Sputnik code&lt;br /&gt;
\c			Ends \C and executes the code found between the \C and \c&lt;br /&gt;
\L			Transform all following letters to lowercase&lt;br /&gt;
\l			Transform the next letter to lowercase&lt;br /&gt;
\I			Transform all following letters to uppercase&lt;br /&gt;
\i			Transform the next letter to uppercase&lt;br /&gt;
\K			Transform all following letters to the opposite case&lt;br /&gt;
\Q			Do not match the following patterns (such as \n \r etc)&lt;br /&gt;
\E			Ends \I, \L, \l, \i, \K or \Q functions&lt;br /&gt;
\|			Nothing - This sequence outputs nothing&lt;br /&gt;
\_			Outputs _&lt;br /&gt;
\{			Outputs {&lt;br /&gt;
\[			Outputs [&lt;br /&gt;
{			The following characters become Sputnik code until } is reached&lt;br /&gt;
&lt;br /&gt;
Example of using the \| escape:&lt;br /&gt;
$a = &amp;quot;cat&amp;quot;;&lt;br /&gt;
println(&amp;quot;$a\|Dog&amp;quot;); // Note this allows you to place the $a followed by Dog directly&lt;br /&gt;
println(&amp;quot;$aDog&amp;quot;); // Where as this would fail&lt;br /&gt;
&lt;br /&gt;
Example of using the \C escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: \C$scalar * 2\c&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
Example of using the { escape:&lt;br /&gt;
my $scalar = 6;&lt;br /&gt;
say &amp;quot;Code: { $scalar * 2 }&amp;quot;; # 'Code: 12'&lt;br /&gt;
&lt;br /&gt;
More complex example of using the { escape:&lt;br /&gt;
my $Str = &amp;quot;\x48\x65\x6c\x6c\x6f World!&amp;quot;;&lt;br /&gt;
foreach($Str as $c)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Char '$c' | Hex: '0x{Hex(Asc('$c'),2)}' | Dec '{Asc('$c')}'&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you don't want to print the return of a \C or { you need to add the ! flag example&lt;br /&gt;
my $i = 0;&lt;br /&gt;
println(&amp;quot;Value $i {\$i++!}&amp;quot;) until($i == 10);&lt;br /&gt;
// The ! flag coming before the } example !} will cause&lt;br /&gt;
// the result value of the operation to not be appended&lt;br /&gt;
// to the final string&lt;br /&gt;
&lt;br /&gt;
To ignore an escape just place a \ next to it for example:&lt;br /&gt;
\\f&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik strings (in memory) technically do and technically do not have a null terminator... If you are treating the string as binary for some reason the string will still print to screen and even print past null bytes in the string as if they were normal letters without a care in the world. However if you are using it as a normal string the end of the string will always be a null terminator that you can check for and use.&lt;br /&gt;
&lt;br /&gt;
Accessing a strings raw memory and finding the null terminator is not as simple as reading the string with $var[] since that will only go to length of the string (minus the null terminator) and even a foreach loop will not hit the null terminator either.&lt;br /&gt;
&lt;br /&gt;
To access the raw memory of a string and physically see its null terminator you must use the Fixed() statement or cast the string as a char* the same as in C here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$str = &amp;quot;Hello World!&amp;quot;;&lt;br /&gt;
// Create a pointer to the strings&lt;br /&gt;
// physical memory and place it in&lt;br /&gt;
// $p&lt;br /&gt;
fixed( $p = $str )&lt;br /&gt;
{&lt;br /&gt;
	// Loop through each character in the string&lt;br /&gt;
	// until the null terminator is hit then stop&lt;br /&gt;
	while( (my $c = (char)*$p++) != @'\0' )&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Character '%c' as decimal '%d' as hex '%x'\n&amp;quot;, $c, $c, $c);&lt;br /&gt;
	}&lt;br /&gt;
	// The fact that it actually stops is proof&lt;br /&gt;
	// the null terminator exists&lt;br /&gt;
}&lt;br /&gt;
// Prints&lt;br /&gt;
// Character 'H' as decimal '72' as hex '48'&lt;br /&gt;
// Character 'e' as decimal '101' as hex '65'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character ' ' as decimal '32' as hex '20'&lt;br /&gt;
// Character 'W' as decimal '87' as hex '57'&lt;br /&gt;
// Character 'o' as decimal '111' as hex '6f'&lt;br /&gt;
// Character 'r' as decimal '114' as hex '72'&lt;br /&gt;
// Character 'l' as decimal '108' as hex '6c'&lt;br /&gt;
// Character 'd' as decimal '100' as hex '64'&lt;br /&gt;
// Character '!' as decimal '33' as hex '21'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variables can go directly inside strings like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;$Dog&amp;quot;);&lt;br /&gt;
// To place a $Dog in a string like $DogHello you do it like this&lt;br /&gt;
println(&amp;quot;$Dog\|Hello&amp;quot;);&lt;br /&gt;
or&lt;br /&gt;
println(&amp;quot;${Dog}Hello&amp;quot;);&lt;br /&gt;
println(&amp;quot;$Dog[2]&amp;quot;); // get second character (if string) or second element (if array)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The benefit of ${Varname} in strings is you get to use Class stuff like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $Price;&lt;br /&gt;
	my $Name;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$var = new Test();&lt;br /&gt;
$var-&amp;gt;$Price = 77;&lt;br /&gt;
$var-&amp;gt;$Name = &amp;quot;Fox&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Price is ${var-&amp;gt;$Price} and name is ${var-&amp;gt;$Name} ok&amp;quot;;&lt;br /&gt;
// Prints&lt;br /&gt;
// Price is 77 and name is Fox ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very useful in being able to use variables properly inside strings as if they were outside the string.&lt;br /&gt;
&lt;br /&gt;
You can set the index of string using [] example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[1] = &amp;quot;?&amp;quot;;&lt;br /&gt;
say $a; // C?t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set the index out of bounds it will use spaces to fill in the gap example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
$a[8] = &amp;quot;T&amp;quot;;&lt;br /&gt;
say $a; // Cat     T&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use += etc on individual chars within a string example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ABC&amp;quot;;&lt;br /&gt;
$a[0] += 1;&lt;br /&gt;
$a[1] += 10;&lt;br /&gt;
$a[2] -= 1;&lt;br /&gt;
say $a; // BLB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiline Strings ====&lt;br /&gt;
&lt;br /&gt;
All string can use multiple lines for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This type of string does not resolve escapes such as \n so the \n in this string will really be seen as \n literally.&lt;br /&gt;
&lt;br /&gt;
If you wish to place a &amp;quot; inside the @&amp;quot;&amp;quot; string you must place 2 of them like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string and im &amp;quot;&amp;quot;quoted&amp;quot;&amp;quot; ok&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also does not need to be on multiple lines example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(@&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of could if you wish to resolve the string just use a normal &amp;quot;&amp;quot; like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println(&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is a&lt;br /&gt;
multiline&lt;br /&gt;
string\n&lt;br /&gt;
&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== String as numbers ====&lt;br /&gt;
&lt;br /&gt;
Unlike most other languages Sputnik supports the use of *= -= &amp;lt;&amp;lt;= and all the other operators on strings.&lt;br /&gt;
&lt;br /&gt;
However unlike a numeric value each letter of the string is treated as an individual byte.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it may set the characters value above which is well out of range of a normal byte however when you try pack the string as ASCII or use it as ASCII it will cast the character to a byte anyway solving the problem entirely.&lt;br /&gt;
&lt;br /&gt;
The operation such as | or ^ etc will be performed on each character in sequence.&lt;br /&gt;
&lt;br /&gt;
The string may be cut down to size if the given operation requires it such as &amp;amp;.&lt;br /&gt;
&lt;br /&gt;
In most languages strings simply become a numeric 0 when you try do math on them (or it may be a numeric value if the string contained a float or decimal) but here the string acts in its own unique way.&lt;br /&gt;
&lt;br /&gt;
This will only trigger if both variables you are trying to do the operation on are STRINGS so to avoiding this behavior is very easy by just simply making sure at least one of your variables is not a string. &lt;br /&gt;
&lt;br /&gt;
This is NOT to be confused with the actual binary arrays as shown in the function reference page.&lt;br /&gt;
&lt;br /&gt;
Like Perl the &amp;amp; | ^ on strings works exactly the same as it does in Perl.&lt;br /&gt;
&lt;br /&gt;
However unlike Perl every other operator also applies to the strings such as + - * / etc this may or may not be useful but it is there if you want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;\x65\x64&amp;quot;; // We can use \xHEXCODE in the strings to define the bytes directly&lt;br /&gt;
$b = &amp;quot;\x65&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;ed&amp;quot;; // Or just put the chars directly&lt;br /&gt;
$b = &amp;quot;e&amp;quot;;&lt;br /&gt;
$a += $b;&lt;br /&gt;
printr($a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above all the operators work like this and instead of returning a numeric value it will re-add the bytes to the string in their modified state.&lt;br /&gt;
&lt;br /&gt;
It will try to never add more bytes than needed so if the operation made an Int32 you will have a string with 4 bytes as a result.&lt;br /&gt;
&lt;br /&gt;
A potential problem with this system is some expressions might not produce expected results for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += $b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: c``&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because its accepting the strings as binary there is a simple way to solve this problem you can cast the $b as an int or float for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (float)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;100&amp;quot;;&lt;br /&gt;
$b = &amp;quot;200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$a += (int)$b;&lt;br /&gt;
&lt;br /&gt;
say $a; // prints: 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although (int) is a 32-bit integer and (float) is a 32-bit floating point number if you require higher numerical values its recommend you use (Int64) instead of (int) and (double) instead of (float).&lt;br /&gt;
&lt;br /&gt;
==== Bitwise String Operators ====&lt;br /&gt;
&lt;br /&gt;
See the above about &amp;quot;Strings as numbers&amp;quot; before reading this section.&lt;br /&gt;
&lt;br /&gt;
Bitstrings of any size may be manipulated by the bitwise operators like ~ | &amp;amp; ^ etc.&lt;br /&gt;
&lt;br /&gt;
If the operands to a binary bitwise op are strings of different sizes, ops act as though the shorter operand had additional zero bits on the right. The granularity for such extension is one or more bytes.&lt;br /&gt;
&lt;br /&gt;
Since Sputnik strings are Unicode (UTF8) when you do an operation like this it makes sure to properly cast as byte to over going over into &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# ASCII-based examples from Perl (applies to Sputnik)&lt;br /&gt;
print &amp;quot;j p \n&amp;quot; ^ &amp;quot; a h&amp;quot;;            # prints &amp;quot;JAPH\n&amp;quot;&lt;br /&gt;
print &amp;quot;JA&amp;quot; | &amp;quot;  ph\n&amp;quot;;              # prints &amp;quot;japh\n&amp;quot;&lt;br /&gt;
print &amp;quot;japh\n&amp;quot; &amp;amp; '_____';           # prints &amp;quot;JAPH\n&amp;quot;;&lt;br /&gt;
print 'p N$' ^ &amp;quot; E&amp;lt;H\n&amp;quot;;            # prints &amp;quot;Perl\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using &amp;quot;&amp;quot; or 0+ , as in the examples below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$foo = 150 | 105;			# yields 255 (0x96 | 0x69 is 0xFF)&lt;br /&gt;
$foo = '150' | 105;			# yields 255&lt;br /&gt;
$foo = 150 | '105';			# yields 255&lt;br /&gt;
$foo = '150' | '105';			# yields string '155' (under ASCII)&lt;br /&gt;
$baz = 0+$foo &amp;amp; 0+$bar;			# both ops explicitly numeric&lt;br /&gt;
$biz = &amp;quot;$foo&amp;quot; ^ &amp;quot;$bar&amp;quot;;			# both ops explicitly stringy&lt;br /&gt;
$biz = (string)$foo ^ (string)$bar;	# both ops explicitly stringy&lt;br /&gt;
					# (of course you can use any cast)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitwise Binary Operators ====&lt;br /&gt;
&lt;br /&gt;
All the above string stuff works on Binary too.&lt;br /&gt;
&lt;br /&gt;
==== Binary ====&lt;br /&gt;
&lt;br /&gt;
Binary is a special kind of variable in Sputnik.&lt;br /&gt;
&lt;br /&gt;
A binary variable contains a byte array inside itself similar to the normal Sputnik arrays but highly optimized to deal with bytes and very low on ram usage.&lt;br /&gt;
&lt;br /&gt;
Each element in the binary can store a number from 0 to 255 you can grow and shrink binary variables at will do and use a wide variety of functions on them.&lt;br /&gt;
&lt;br /&gt;
What makes the Binary a rather special value in Sputnik is the fact that its never copied or cloned and instead passes itself to everything kind of like a reference.&lt;br /&gt;
&lt;br /&gt;
This means you can pass it around all over the place and use many functions and yet your are still using and modifying your original binary variable the whole time.&lt;br /&gt;
&lt;br /&gt;
This makes it extremely fast since it never has to copy it.&lt;br /&gt;
&lt;br /&gt;
In fact the only time it really needs to do anything else is when you increase its size then it has to extend its internal byte buffer.&lt;br /&gt;
&lt;br /&gt;
The only way to destroy a binary variable is to explicitly use Unset() or BinaryWipe() on it other than that it will remain forever (Or until no more references to it exist then it will delete itself).&lt;br /&gt;
&lt;br /&gt;
Sputnik has a lot of very good Binary functions including stuff like Pack(), Unpack() and even Vec() just like Perl.&lt;br /&gt;
&lt;br /&gt;
Another thing you can do convert to/from any data type to/from binary in Sputnik for example you can place the (binary) cast similar to an (int) cast in C++ to convert stuff to binary in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Everything can be converted to binary including integers, floating points, strings, arrays etc.&lt;br /&gt;
&lt;br /&gt;
You can also convert back to using their casts this makes working with binary effortless in Sputnik.&lt;br /&gt;
&lt;br /&gt;
Also since Binary is a CORE data type in Sputnik (just like Integer/String) you will always know if a variable contains binary or not and it will print/act accordingly unlike PHP for example where it can be extremely difficult to know if you really do have a binary variable or not (Since it uses String for Binary+Strings).&lt;br /&gt;
&lt;br /&gt;
Sputnik does not store Binary inside strings it is a dedicated Byte array you can of course convert a string to binary.&lt;br /&gt;
&lt;br /&gt;
Using Pack to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using cast to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = (binary)&amp;quot;Hello&amp;quot;;&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using bin() to create binary:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(72, 101, 108, 108, 111);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course bin() can use hex:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
printr $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 72&lt;br /&gt;
//     [1] =&amp;gt; 101&lt;br /&gt;
//     [2] =&amp;gt; 108&lt;br /&gt;
//     [3] =&amp;gt; 108&lt;br /&gt;
//     [4] =&amp;gt; 111&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binary will always try print as an ASCII string example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(0x48, 0x65, 0x6C, 0x6C, 0x6F);&lt;br /&gt;
say $bin;&lt;br /&gt;
// Prints:&lt;br /&gt;
// Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bin() supports a number of cool stuff like sequences&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$bin = bin(@'A', 'B'..'G', 0x10..0x15, 5..8);&lt;br /&gt;
printr $bin;&lt;br /&gt;
say BinaryExpand($bin);&lt;br /&gt;
// Prints&lt;br /&gt;
// Binary&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 65&lt;br /&gt;
//     [1] =&amp;gt; 66&lt;br /&gt;
//     [2] =&amp;gt; 67&lt;br /&gt;
//     [3] =&amp;gt; 68&lt;br /&gt;
//     [4] =&amp;gt; 69&lt;br /&gt;
//     [5] =&amp;gt; 70&lt;br /&gt;
//     [6] =&amp;gt; 71&lt;br /&gt;
//     [7] =&amp;gt; 16&lt;br /&gt;
//     [8] =&amp;gt; 17&lt;br /&gt;
//     [9] =&amp;gt; 18&lt;br /&gt;
//     [10] =&amp;gt; 19&lt;br /&gt;
//     [11] =&amp;gt; 20&lt;br /&gt;
//     [12] =&amp;gt; 21&lt;br /&gt;
//     [13] =&amp;gt; 5&lt;br /&gt;
//     [14] =&amp;gt; 6&lt;br /&gt;
//     [15] =&amp;gt; 7&lt;br /&gt;
//     [16] =&amp;gt; 8&lt;br /&gt;
// )&lt;br /&gt;
// 00 | 41 42 43 44 45 46 47 10 11 12 13 14 15 05 06 07 ABCDEFG.........&lt;br /&gt;
// 01 | 08 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Booleans ====&lt;br /&gt;
&lt;br /&gt;
Booleans are logical values. Only two Boolean values exist: true and false.&lt;br /&gt;
&lt;br /&gt;
They can be used in variable assignments, together with the Boolean operators and, or and not.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$Boolean2 = false;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:&lt;br /&gt;
&lt;br /&gt;
A Boolean true will be converted into the numeric value 1&lt;br /&gt;
&lt;br /&gt;
A Boolean false will be converted into the numeric value 0&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;
$Boolean1 = true;&lt;br /&gt;
$Number1 = 100;&lt;br /&gt;
$Number2 = $Boolean1 + $Number1;&lt;br /&gt;
println( $Number2 ); // This will result in $Number2 to be the numeric value 101&lt;br /&gt;
&lt;br /&gt;
$Boolean1 = true;&lt;br /&gt;
$String1 = &amp;quot;Test is: &amp;quot;;&lt;br /&gt;
$String2 = $String1 . $Boolean1;&lt;br /&gt;
println( $String2 ) // This will result in $String2 being the string value &amp;quot;Test is: True&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Arrays ====&lt;br /&gt;
&lt;br /&gt;
Variables can also be arrays storing multiple variables in a single variable accessible by its [] index.&lt;br /&gt;
&lt;br /&gt;
Arrays operate very much like PHPs in that it is an array and a hash at the same time.&lt;br /&gt;
&lt;br /&gt;
Heres a simple example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of adding stuff to end and beginning of an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol .= array(5, 6); // Add 2 Elements to end of the array&lt;br /&gt;
$lol ..= array(0); // Add 1 Element to start of the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[3] :&amp;quot; . $lol[3]);&lt;br /&gt;
println(&amp;quot;lol[4] :&amp;quot; . $lol[4]);&lt;br /&gt;
println(&amp;quot;lol[5] :&amp;quot; . $lol[5]);&lt;br /&gt;
println(&amp;quot;lol[6] :&amp;quot; . $lol[6]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To delete an array you can simply define it as anything including strings but the best way is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
$lol = array(); // Delete the array&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying an array is simple too example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$test = $lol;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;test :&amp;quot; . $test);&lt;br /&gt;
println(&amp;quot;test[0] :&amp;quot; . $test[0]);&lt;br /&gt;
println(&amp;quot;test[1] :&amp;quot; . $test[1]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was a full COPY of the array changing elements in one array will not effect the other unless your first array contained references but we will get into that later.&lt;br /&gt;
&lt;br /&gt;
Arrays can also be modified directly example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[2] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$lol[1] = &amp;quot;hmmm&amp;quot;;&lt;br /&gt;
$lol[99] = &amp;quot;hi there!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println(&amp;quot;lol :&amp;quot; . $lol);&lt;br /&gt;
println(&amp;quot;lol[0] :&amp;quot; . $lol[0]);&lt;br /&gt;
println(&amp;quot;lol[1] :&amp;quot; . $lol[1]);&lt;br /&gt;
println(&amp;quot;lol[2] :&amp;quot; . $lol[2]);&lt;br /&gt;
println(&amp;quot;lol[98] :&amp;quot; . $lol[98]);&lt;br /&gt;
println(&amp;quot;lol[99] :&amp;quot; . $lol[99]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to end of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add items to beginning of an array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(1, 2, 3, 4); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[] = 5;&lt;br /&gt;
$lol[] = 6;&lt;br /&gt;
$lol[] = 7;&lt;br /&gt;
&lt;br /&gt;
$lol[]! = 0;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
printr($lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example you can see simply typing $var[index] = will cause it to create that index (part of the array) and fill it with what you type, The array will be automatically expanded to the size you request all the elements in the gap that it fills in will be empty strings ready for use (As seen in index 98).&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(0 =&amp;gt; array(3, 4), 1 =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol[0][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol[0] :&amp;quot; . $lol[0] );&lt;br /&gt;
println( &amp;quot;lol[0][0] :&amp;quot; . $lol[0][0] );&lt;br /&gt;
println( &amp;quot;lol[0][1] :&amp;quot; . $lol[0][1] );&lt;br /&gt;
println( &amp;quot;lol[1][3] :&amp;quot; . $lol[1][3] );&lt;br /&gt;
println( &amp;quot;lol[1][3][0] :&amp;quot; . $lol[1][3][0] );&lt;br /&gt;
println( &amp;quot;lol[1][3][1] :&amp;quot; . $lol[1][3][1] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; );&lt;br /&gt;
$a = array(  1, $b[&amp;lt;&amp;gt;], 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to place an array inside an array (including its dictionary keys) when creating it you do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$b = array( &amp;quot;cat&amp;quot; =&amp;gt; &amp;quot;meow&amp;quot;, &amp;quot;dog&amp;quot; =&amp;gt; &amp;quot;woof&amp;quot; );&lt;br /&gt;
$a = array(  1, $b, 3, 4  );&lt;br /&gt;
&lt;br /&gt;
# So $a becomes array(  1, &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot;, 3, 4  );&lt;br /&gt;
# If we didnt include the [&amp;lt;&amp;gt;] then $b itself would&lt;br /&gt;
# be inserted directly into $a rather than just copying&lt;br /&gt;
# its values&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qw// to produce simple arrays example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// the qw// accepts only alphanumeric letters separated by spaces&lt;br /&gt;
$arr = qw/test omg lol/;&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;First test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is equal to&lt;br /&gt;
$arr = array(&amp;quot;test&amp;quot;, &amp;quot;omg&amp;quot;, &amp;quot;lol&amp;quot;);&lt;br /&gt;
foreach($arr as $lol)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Second test :&amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qw(test omg lol);&lt;br /&gt;
// $arr = qw{test omg lol};&lt;br /&gt;
// $arr = qw~test omg lol~;&lt;br /&gt;
// $arr = qw!test omg lol!;&lt;br /&gt;
// $arr = qw%test omg lol%;&lt;br /&gt;
// $arr = qw:test omg lol:;&lt;br /&gt;
// $arr = qw^test omg lol^;&lt;br /&gt;
// $arr = qw?test omg lol?;&lt;br /&gt;
// $arr = qw¬test omg lol¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparing arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray == $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray != $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a even more perfect match&lt;br /&gt;
if($firstarray === $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray !== $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match&lt;br /&gt;
if($firstarray eq $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neq $secondarray)&lt;br /&gt;
// Compare the full array and all elements requiring a perfect match (case insensitive)&lt;br /&gt;
if($firstarray eqi $secondarray)&lt;br /&gt;
// Reverse of above&lt;br /&gt;
if($firstarray neqi $secondarray)&lt;br /&gt;
&lt;br /&gt;
// Note if you use &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; etc&lt;br /&gt;
// the arrays will be converted into their index size&lt;br /&gt;
// so a 10 element array becomes the number 10 in such an IF&lt;br /&gt;
// only the == etc can be used to compare the whole array&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Print all elements in the array (Similar to Join() function)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Theres a lot more arrays can be used for and theres a lot of functions to use with them but that will be shown in another part of this wiki.&lt;br /&gt;
&lt;br /&gt;
==== Hashes (Dictionary) ====&lt;br /&gt;
&lt;br /&gt;
A Hash (Dictionary) is used to store variables under a key name this is useful for creating a kind of key/value system and is more useful then arrays in situations where you need this.&lt;br /&gt;
&lt;br /&gt;
(Its worth noting a variable can contain both an array and a hash at the same time.&lt;br /&gt;
This is because an array and an hash share the same data structure the arrays indexes are simply just keys in the hash.&lt;br /&gt;
Sputnik will keep the hash organized and sorted numerically then alphabetically for use in loops and whatever else.)&lt;br /&gt;
&lt;br /&gt;
The key in a hash is case insensitive.&lt;br /&gt;
&lt;br /&gt;
Everything you can do with arrays you can do with the dictionary they are the same thing entirely just like in PHP.&lt;br /&gt;
&lt;br /&gt;
Heres a brief example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add more elements to the Hash using the ..= example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more simple approach to adding new values is to simply modify the value directly example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cc = array(&amp;quot;One&amp;quot; =&amp;gt; &amp;quot;cat&amp;quot;, &amp;quot;Two&amp;quot; =&amp;gt; &amp;quot;dog&amp;quot;, &amp;quot;Three&amp;quot; =&amp;gt; &amp;quot;mouse&amp;quot;);&lt;br /&gt;
$cc .= array(&amp;quot;Four&amp;quot; =&amp;gt; &amp;quot;woman&amp;quot;, &amp;quot;Five&amp;quot; =&amp;gt; &amp;quot;man&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$cc[&amp;quot;Six&amp;quot;] = &amp;quot;Sheep&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;One&amp;quot;] = &amp;quot;Not a cat!&amp;quot;;&lt;br /&gt;
$cc[&amp;quot;Seven&amp;quot;] = &amp;quot;Donkey&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;cc :&amp;quot; . $cc);&lt;br /&gt;
println(&amp;quot;cc[one] :&amp;quot; . $cc[&amp;quot;One&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[two] :&amp;quot; . $cc[&amp;quot;Two&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[three] :&amp;quot; . $cc[&amp;quot;Three&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[four] :&amp;quot; . $cc[&amp;quot;Four&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[five] :&amp;quot; . $cc[&amp;quot;Five&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[six] :&amp;quot; . $cc[&amp;quot;Six&amp;quot;]);&lt;br /&gt;
println(&amp;quot;cc[seven] :&amp;quot; . $cc[&amp;quot;Seven&amp;quot;]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of Multi-dimensional hash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$lol = array(&amp;quot;One&amp;quot; =&amp;gt; array(3, 4), &amp;quot;Two&amp;quot; =&amp;gt; array(3 =&amp;gt;array(8, 9))); // Create a simple array with 4 elements&lt;br /&gt;
&lt;br /&gt;
$lol['One'][0] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print the details of the array&lt;br /&gt;
println( &amp;quot;lol :&amp;quot; . $lol );&lt;br /&gt;
println( &amp;quot;lol['One'] :&amp;quot; . $lol['One'] );&lt;br /&gt;
println( &amp;quot;lol['One'][0] :&amp;quot; . $lol['One'][0] );&lt;br /&gt;
println( &amp;quot;lol['One'][1] :&amp;quot; . $lol['One'][1] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3] :&amp;quot; . $lol['Two'][3] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][0] :&amp;quot; . $lol['Two'][3][0] );&lt;br /&gt;
println( &amp;quot;lol['Two'][3][1] :&amp;quot; . $lol['Two'][3][1] );&lt;br /&gt;
&lt;br /&gt;
// Note you can mix array index and hash strings to create all kinds of MD arrays&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the qww// to produce simple arrays (with keys) example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// Alternatively you could use:&lt;br /&gt;
// $arr = qww(1 one 2 two 3 three 4 four);&lt;br /&gt;
// $arr = qww{1 one 2 two 3 three 4 four};&lt;br /&gt;
// $arr = qww~1 one 2 two 3 three 4 four~;&lt;br /&gt;
// $arr = qww!1 one 2 two 3 three 4 four!;&lt;br /&gt;
// $arr = qww%1 one 2 two 3 three 4 four%;&lt;br /&gt;
// $arr = qww:1 one 2 two 3 three 4 four:;&lt;br /&gt;
// $arr = qww^1 one 2 two 3 three 4 four^;&lt;br /&gt;
// $arr = qww?1 one 2 two 3 three 4 four?;&lt;br /&gt;
// $arr = qww¬1 one 2 two 3 three 4 four¬;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also spread the qww out like so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
# initialize &lt;br /&gt;
my $hash = array();&lt;br /&gt;
&lt;br /&gt;
# populate the hash with a few elements&lt;br /&gt;
$hash = qww(&lt;br /&gt;
	Cat		Meow&lt;br /&gt;
	Dog		Woof&lt;br /&gt;
	Foo		Bar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# print the %hash&lt;br /&gt;
foreach($hash as $key =&amp;gt; $val)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;$key =&amp;gt; $val\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot more you can do with hashes including functions to make using them easier but that will be shown in another part of the wiki.&lt;br /&gt;
&lt;br /&gt;
==== Enum ====&lt;br /&gt;
&lt;br /&gt;
Enums are a variable that lets you get a number from it and each one is unique.&lt;br /&gt;
&lt;br /&gt;
A local scope MY enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 1&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 2&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 3&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another local scope but this time with a few base variables&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my enum&lt;br /&gt;
{&lt;br /&gt;
	$Cat,&lt;br /&gt;
	$Dog = 20,&lt;br /&gt;
	$Fox,&lt;br /&gt;
	$Cow = 55,&lt;br /&gt;
	$Pig&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;Cat: &amp;quot; . $Cat); // Prints 0&lt;br /&gt;
println(&amp;quot;Dog: &amp;quot; . $Dog); // Prints 20&lt;br /&gt;
println(&amp;quot;Fox: &amp;quot; . $Fox); // Prints 21&lt;br /&gt;
println(&amp;quot;Cow: &amp;quot; . $Cow); // Prints 55&lt;br /&gt;
println(&amp;quot;Pig: &amp;quot; . $Pig); // Prints 56&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global scope enum accessible by all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 50,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 0&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 1&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 2&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 3&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 50&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 51&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 52&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also create enums using bitwise flag numbers instead of single ++ incremental decimals by using the FLAGS rule example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 16&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 32&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 64&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can still use defaults with flags example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal = 300,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also combine flags example&lt;br /&gt;
&lt;br /&gt;
WARNING - You must have already defined the flags you wish to combine! You can't combine flags that don't exist in the enum yet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[Flags(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Countries&lt;br /&gt;
{&lt;br /&gt;
	#$Test = $England + $France IT WOULD NOT WORK HERE&lt;br /&gt;
	$England,&lt;br /&gt;
	$France,&lt;br /&gt;
	#$Test = $England + $France IT COULD WORK HERE&lt;br /&gt;
	$Germany,&lt;br /&gt;
	$Netherlands,&lt;br /&gt;
	$Portugal,&lt;br /&gt;
	$Italy,&lt;br /&gt;
	$Russia,&lt;br /&gt;
	$Test = $England + $France&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
println(&amp;quot;England: &amp;quot; . Countries-&amp;gt;$England); // Prints 1&lt;br /&gt;
println(&amp;quot;France: &amp;quot; . Countries-&amp;gt;$France); // Prints 2&lt;br /&gt;
println(&amp;quot;Germany: &amp;quot; . Countries-&amp;gt;$Germany); // Prints 4&lt;br /&gt;
println(&amp;quot;Netherlands: &amp;quot; . Countries-&amp;gt;$Netherlands); // Prints 8&lt;br /&gt;
println(&amp;quot;Portugal: &amp;quot; . Countries-&amp;gt;$Portugal); // Prints 300&lt;br /&gt;
println(&amp;quot;Italy: &amp;quot; . Countries-&amp;gt;$Italy); // Prints 600&lt;br /&gt;
println(&amp;quot;Russia: &amp;quot; . Countries-&amp;gt;$Russia); // Prints 1200&lt;br /&gt;
println(&amp;quot;Test: &amp;quot; . Countries-&amp;gt;$Test); // Prints 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define an enum as an override that will replace an existing enum with the same name example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$C; // Prints 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can define an enum with AddOnce so if another enum using same name tries to get added no error will be shown but it will reject it (override takes precedence over AddOnce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[AddOnce(&amp;quot;true&amp;quot;)]&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Cat&lt;br /&gt;
{&lt;br /&gt;
	$A,&lt;br /&gt;
	$B,&lt;br /&gt;
	$C&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
say Cat-&amp;gt;$B; // Prints 1&lt;br /&gt;
say Cat-&amp;gt;$C; // error&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enum (Embedding ) ====&lt;br /&gt;
&lt;br /&gt;
An enum can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the enum already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!EnumExists(&amp;quot;Animals&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the enum using the Embedded keyword&lt;br /&gt;
	Embedded Enum Animals&lt;br /&gt;
	{&lt;br /&gt;
		$Dog,&lt;br /&gt;
		$Cat,&lt;br /&gt;
		$Fox&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
say Animals-&amp;gt;$Dog;&lt;br /&gt;
say Animals-&amp;gt;$Cat;&lt;br /&gt;
say Animals-&amp;gt;$Fox;&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0&lt;br /&gt;
// 1&lt;br /&gt;
// 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
A variable is a place to store information in a way that is easy to get and change.&lt;br /&gt;
&lt;br /&gt;
==== Declaring Variables ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to create variables either scoped or unscoped example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
The second way to create variables is to define its scope example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $var = 100;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing LOCAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a LOCAL scope variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Global $var = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will either modify an existing GLOBAL variable called $var and change its value to 100 or it will create the variable on the stack in this case it will create a GLOBAL scope variable.&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
Sputnik does support static variables that can never be changed once you define them that is they do not change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Def $a = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
$a = 10; // Cant change it&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
unset($a); // Cant even delete it!&lt;br /&gt;
say $a; // Prints: Hello&lt;br /&gt;
// BUT you can RE def it&lt;br /&gt;
// This is because the only way&lt;br /&gt;
// to change a static DEF variable&lt;br /&gt;
// is to TOTALLY replace it by a NEW&lt;br /&gt;
// DEF variable&lt;br /&gt;
Def $a = &amp;quot;Cat&amp;quot;;&lt;br /&gt;
say $a; // Prints: Cat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way you can use Def to create a variable and you can feel safe knowing it's not going to suddenly change by accident unless for some reason Def is called again with the same variable name.&lt;br /&gt;
&lt;br /&gt;
However since your Defs should only be called once it should not be possible to get two of them.&lt;br /&gt;
&lt;br /&gt;
Alternatively you could take a look at the [[Preprocessor|Preprocessor]] and use that to define a @MACRO that does not change as well.&lt;br /&gt;
&lt;br /&gt;
==== Scope ====&lt;br /&gt;
&lt;br /&gt;
A variable's scope is controlled by when and how you declare the variable. In most cases your variables will be Global unless you specifically set them to Local. Global scope and can be read or changed from anywhere in the script.&lt;br /&gt;
&lt;br /&gt;
If you declare a variable inside a function and you made it Local scope it can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.&lt;br /&gt;
&lt;br /&gt;
The same is true for classes.&lt;br /&gt;
&lt;br /&gt;
So inside a function you only have the function/class(and class function) itself as a LOCAL scope to use and outside a function your local scope is the actual script itself.&lt;br /&gt;
&lt;br /&gt;
However if you &amp;quot;really&amp;quot; need a new local scope any any point you can use the {...} statement example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $lol = 100;&lt;br /&gt;
{&lt;br /&gt;
	my $lol = 88;&lt;br /&gt;
	println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;lol is: &amp;quot; . $lol);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every local variable defined inside the block exists only in the block.&lt;br /&gt;
&lt;br /&gt;
You can also stack blocks inside each other.&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
&lt;br /&gt;
There are 2 ways to cast a value as something else the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . Int(777.42) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause everything inside the Int() to be converted to an int this uses the function [[Core Function Int32|Int32( $variable )]] (Alias: Int( $variable )).&lt;br /&gt;
&lt;br /&gt;
The second way is similar to C and works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)777.42 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;(int)value&amp;quot; type will only convert what it *touches* so if you want to convert a large expression you must cover with () example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 11.6&lt;br /&gt;
println( &amp;quot;The cast is : &amp;quot; . (int)(777.42 + $a) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Casting is very useful since there will be times when you really need to be using only INTs or FLOATs and by casting you will make sure that you do.&lt;br /&gt;
&lt;br /&gt;
Its worth noting the actual &amp;quot;(type)value&amp;quot; cast supports casting overloading on Classes where as the function &amp;quot;type(value)&amp;quot; does not.&lt;br /&gt;
&lt;br /&gt;
A special cast is the ability to cast things as an array example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
printr( (array)&amp;quot;Hello World&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if it is an array before casting it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
printr( $a ~~ Array ? $a : (array)$a );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rather hidden cast is the char* it can be used to get a pointer to a strings physical memory address example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = &amp;quot;Testy&amp;quot;;&lt;br /&gt;
$p = (char*)$a;&lt;br /&gt;
printf(&amp;quot;Address is %p and value is %s\n&amp;quot;, (IntPtr)$p, (string)$p);&lt;br /&gt;
// Warning when you do (char*) it will forcefully&lt;br /&gt;
// convert the variable to a string if it is not&lt;br /&gt;
// already a string&lt;br /&gt;
// If you desire a less forceful way check out the Fixed() statement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid casts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(ascii)&lt;br /&gt;
ASCII - Returns a copy of a string but with all Unicode characters stripped&lt;br /&gt;
        out of it. It will not even try cast the Unicode it will just ignore them.&lt;br /&gt;
        This is equal to &amp;quot;RAW&amp;quot; mode in BinaryFromStr()&lt;br /&gt;
&lt;br /&gt;
(array)&lt;br /&gt;
Array&lt;br /&gt;
&lt;br /&gt;
(binary)&lt;br /&gt;
(bin)&lt;br /&gt;
Binary = Return binary variable of the strings bytes (Ignores extra unicode bytes)&lt;br /&gt;
&lt;br /&gt;
(bool)&lt;br /&gt;
Bool&lt;br /&gt;
&lt;br /&gt;
(char)&lt;br /&gt;
Char&lt;br /&gt;
&lt;br /&gt;
(byte)&lt;br /&gt;
Byte&lt;br /&gt;
&lt;br /&gt;
(sbyte)&lt;br /&gt;
Sbyte&lt;br /&gt;
&lt;br /&gt;
(short)&lt;br /&gt;
(int16)&lt;br /&gt;
Int16&lt;br /&gt;
&lt;br /&gt;
(int)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int32)&lt;br /&gt;
Int32&lt;br /&gt;
&lt;br /&gt;
(int64)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(integer)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(long)&lt;br /&gt;
Int64&lt;br /&gt;
&lt;br /&gt;
(ushort)&lt;br /&gt;
(uint16)&lt;br /&gt;
Uint16&lt;br /&gt;
&lt;br /&gt;
(uint)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint32)&lt;br /&gt;
Uint32&lt;br /&gt;
&lt;br /&gt;
(uint64)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ulong)&lt;br /&gt;
Uint64&lt;br /&gt;
&lt;br /&gt;
(ptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(intptr)&lt;br /&gt;
IntPtr&lt;br /&gt;
&lt;br /&gt;
(uptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(uintptr)&lt;br /&gt;
UintPtr&lt;br /&gt;
&lt;br /&gt;
(float)&lt;br /&gt;
Float&lt;br /&gt;
&lt;br /&gt;
(double)&lt;br /&gt;
Double&lt;br /&gt;
&lt;br /&gt;
(string)&lt;br /&gt;
String&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bit Flags ====&lt;br /&gt;
&lt;br /&gt;
Bit flags , or bit fields are a great way of storing several boolean values in a single byte (or set of bytes), and are internally represented as binary. In this tutorial we will work with bitwise operators, so if you need to brush up this is what we're using; the following key binary operators.&lt;br /&gt;
&lt;br /&gt;
Sputnik has dedicated functions to handle Setting and Testing for flags you can find them here:&lt;br /&gt;
&lt;br /&gt;
[[Core Function HasFlag|HasFlag( )]]&lt;br /&gt;
&lt;br /&gt;
[[Core Function SetFlag|SetFlag( )]]&lt;br /&gt;
&lt;br /&gt;
These examples should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
They show how to do flags using the core language instead of using HasFlag() and SetFlag().&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;
  $Flag1 = 0x01,&lt;br /&gt;
  $Flag2 = 0x02,&lt;br /&gt;
  $Flag3 = 0x04,&lt;br /&gt;
  $Flag4 = 0x08,&lt;br /&gt;
  $Flag5 = 0x10,&lt;br /&gt;
  $Flag6 = 0x20&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Make a variable to store the flags&lt;br /&gt;
Global $Opt = 0; // No flags are set&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag2; // Set Flag2 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag5; // Set Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test2&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~Options-&amp;gt;$Flag3; // Set Flag3 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag5; // Set Flag5 to TRUE&lt;br /&gt;
$Opt |= Options-&amp;gt;$Flag3; // Set Flag3 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt &amp;amp;= ~(Options-&amp;gt;$Flag3 | Options-&amp;gt;$Flag5); // Set Flag3 and Flag5 to FALSE&lt;br /&gt;
TestFlags(&amp;quot;Test4&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$Opt |= (Options-&amp;gt;$Flag1 | Options-&amp;gt;$Flag6); // Set Flag1 and Flag6 to TRUE&lt;br /&gt;
TestFlags(&amp;quot;Test5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Function TestFlags($str)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;### $str BELOW&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\$Opt = {Hex('$Opt', 2)}&amp;quot;);&lt;br /&gt;
	foreach( Enumerate(&amp;quot;Options&amp;quot;) as $Flag =&amp;gt; $ID )&lt;br /&gt;
	{&lt;br /&gt;
		if($Opt &amp;amp; $ID)&lt;br /&gt;
			println(&amp;quot;$Flag is TRUE&amp;quot;);&lt;br /&gt;
		else&lt;br /&gt;
			println(&amp;quot;$Flag is FALSE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	println(&amp;quot;### $str ABOVE\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another 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;
&lt;br /&gt;
//to store the option flags&lt;br /&gt;
my $opt = 0x0;&lt;br /&gt;
&lt;br /&gt;
//argument array.&lt;br /&gt;
my $argv = qw(a b);&lt;br /&gt;
foreach($argv as $c)&lt;br /&gt;
{&lt;br /&gt;
	switch($c)&lt;br /&gt;
	{ &lt;br /&gt;
		case 'a':&lt;br /&gt;
		//assign option bits to &amp;quot;opt&amp;quot; bit array&lt;br /&gt;
			$opt |= $OPT_A;  break;&lt;br /&gt;
		case 'b':&lt;br /&gt;
			$opt |= $OPT_B;  break;&lt;br /&gt;
		case 'c':&lt;br /&gt;
			$opt |= $OPT_C;  break;&lt;br /&gt;
		case 'h':&lt;br /&gt;
			$opt |= $OPT_H;  break;&lt;br /&gt;
		//this will happen if they enter an invalid option:&lt;br /&gt;
		default: &lt;br /&gt;
			print(&amp;quot;Unknown option $c&amp;quot;);&lt;br /&gt;
			return 1; //break out of application&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//apply bitwise AND to check for assignedness a few times&lt;br /&gt;
if($opt &amp;amp; $OPT_A)&lt;br /&gt;
	print(&amp;quot;Hello World!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_B) {&lt;br /&gt;
	my $foo = 2000;&lt;br /&gt;
	print(&amp;quot;Foo has been initialized.\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//compare if two flags were specifically set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_B | $OPT_C)) == ($OPT_B | $OPT_C)) &lt;br /&gt;
	print(&amp;quot;Flags B and C were set.\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if($opt &amp;amp; $OPT_H) {&lt;br /&gt;
	//print help, may wish to create exit point to stop program from executing&lt;br /&gt;
	print(&amp;quot;\tHelp is not implemented yet\n\tAllowable options: [abch]\n&amp;quot;);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------- Some fun extras: ---------------------//&lt;br /&gt;
&lt;br /&gt;
//Reset bitflag completely&lt;br /&gt;
$opt = 0;&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise OR to append multiple flags&lt;br /&gt;
$opt = ($OPT_A | $OPT_B | $OPT_C);&lt;br /&gt;
&lt;br /&gt;
//Apply bitwise AND+EQUALS to add or remove flags to existing option field&lt;br /&gt;
//Then we apply bitwise NOT (a complement) to remove both flags&lt;br /&gt;
$opt &amp;amp;= ~($OPT_A | $OPT_B);&lt;br /&gt;
&lt;br /&gt;
//Options A and B are now removed&lt;br /&gt;
&lt;br /&gt;
//Check if BOTH flags are not set&lt;br /&gt;
if (($opt &amp;amp; ($OPT_A | $OPT_B)) == 0)&lt;br /&gt;
	print(&amp;quot;Flags A and B are not set\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//check if only one is not set&lt;br /&gt;
if (($opt &amp;amp; $OPT_A) == 0)&lt;br /&gt;
	printf(&amp;quot;Flag A is not set\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
//end program&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
Sputnik has an number of Macros that are special read-only variables. Macros start with the @ character instead of the usual $ so are easy to tell apart. As with normal variables you can use macros in expressions but you cannot assign a value to them.&lt;br /&gt;
&lt;br /&gt;
The pre-defined macros are generally used to provide easy access to information and constants such as @PI etc.&lt;br /&gt;
&lt;br /&gt;
Go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Sputnik does support some pbject-oriented programming however its too big for this page alone so its best to go see the classes page&lt;br /&gt;
&lt;br /&gt;
[[Classes|Classes]]&lt;br /&gt;
&lt;br /&gt;
=== Operators ===&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (range mode) ====&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Range mode.&lt;br /&gt;
&lt;br /&gt;
The first action of this operator is the ability to make ranges of stuff and these ranges may be either a string or an array.&lt;br /&gt;
&lt;br /&gt;
In this example we make a range of the chars from A to F&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say 'A'..'F';&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also join multiple ranges together example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('A'..'F') . ('0'..'3');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('A'..'F', '0'..'3');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// ABCDEF0123&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; A&lt;br /&gt;
//     [1] =&amp;gt; B&lt;br /&gt;
//     [2] =&amp;gt; C&lt;br /&gt;
//     [3] =&amp;gt; D&lt;br /&gt;
//     [4] =&amp;gt; E&lt;br /&gt;
//     [5] =&amp;gt; F&lt;br /&gt;
//     [6] =&amp;gt; 0&lt;br /&gt;
//     [7] =&amp;gt; 1&lt;br /&gt;
//     [8] =&amp;gt; 2&lt;br /&gt;
//     [9] =&amp;gt; 3&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ranges may go backwards&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say ('F'..'A') . ('3'..'0');&lt;br /&gt;
// Array form&lt;br /&gt;
printr array('F'..'A', '3'..'0');&lt;br /&gt;
// PRINTS&lt;br /&gt;
// FEDCBA3210&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; F&lt;br /&gt;
//     [1] =&amp;gt; E&lt;br /&gt;
//     [2] =&amp;gt; D&lt;br /&gt;
//     [3] =&amp;gt; C&lt;br /&gt;
//     [4] =&amp;gt; B&lt;br /&gt;
//     [5] =&amp;gt; A&lt;br /&gt;
//     [6] =&amp;gt; 3&lt;br /&gt;
//     [7] =&amp;gt; 2&lt;br /&gt;
//     [8] =&amp;gt; 1&lt;br /&gt;
//     [9] =&amp;gt; 0&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do Numeric changes (cannot be floating points)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// String form&lt;br /&gt;
say (0..3) . (4..2);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array(0..3, 4..2);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123432&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; 4&lt;br /&gt;
//     [5] =&amp;gt; 3&lt;br /&gt;
//     [6] =&amp;gt; 2&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally a range may be variables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define some variables&lt;br /&gt;
my $a = 0;&lt;br /&gt;
my $b = 3;&lt;br /&gt;
my $c = 'T';&lt;br /&gt;
my $d = 'Z';&lt;br /&gt;
// String form&lt;br /&gt;
say ($a..$b) . ($c..$d);&lt;br /&gt;
// Array form&lt;br /&gt;
printr array($a..$b, $c..$d);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// 0123TUVWXYZ&lt;br /&gt;
// Array&lt;br /&gt;
// (&lt;br /&gt;
//     [0] =&amp;gt; 0&lt;br /&gt;
//     [1] =&amp;gt; 1&lt;br /&gt;
//     [2] =&amp;gt; 2&lt;br /&gt;
//     [3] =&amp;gt; 3&lt;br /&gt;
//     [4] =&amp;gt; T&lt;br /&gt;
//     [5] =&amp;gt; U&lt;br /&gt;
//     [6] =&amp;gt; V&lt;br /&gt;
//     [7] =&amp;gt; W&lt;br /&gt;
//     [8] =&amp;gt; X&lt;br /&gt;
//     [9] =&amp;gt; Y&lt;br /&gt;
//     [10] =&amp;gt; Z&lt;br /&gt;
// )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .. (flip flop mode) and Operator ff ====&lt;br /&gt;
&lt;br /&gt;
You can define the range operator as .. or ff the only differance is that ff makes there zero chance you might accidently use a range operator.&lt;br /&gt;
&lt;br /&gt;
Range and Flip Flop operator -- here we will demonstrate the Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
If the LEFT and the RIGHT parts of the .. BOTH return a BOOLEAN value ie TRUE or FALSE (not numeric values it MUST be a true boolean) then it will enter Flip Flop mode.&lt;br /&gt;
&lt;br /&gt;
Once in Flip Flop mode the operator will check if the LEFT is true if it is not TRUE it will return FALSE.&lt;br /&gt;
&lt;br /&gt;
Once the LEFT returns TRUE the operator will also return a number starting 1 then all subsequent calls to the operator (on that line of code) will return the same number perminently regarldess if the LEFT is a match or not.&lt;br /&gt;
&lt;br /&gt;
If the LEFT continues to be TRUE multiple times the operator will increase the number it returns (starting at 1 then going to 2 and so on)&lt;br /&gt;
&lt;br /&gt;
If while in TRUE mode (after the LEFT has been true at least ONCE) if the RIGHT becomes TRUE the operator will the next number but followed by E0 then it will immediately start returning FALSE for all subsequent calls until the LEFT returns true again then its begins all over again.&lt;br /&gt;
&lt;br /&gt;
The operator remembers its STATE on that line of code regardless for how long your program has been running and if its TRUE mode it will continue to return true for all lines even if it NEVER got a LEFT true match in the current iteration of a loop.&lt;br /&gt;
&lt;br /&gt;
This means if at any time in your program the LEFT of the operator is a TRUE then the operator will return a number above 0 every time its used regardless if you call it 5 hours later (as long it is that individual operator).&lt;br /&gt;
&lt;br /&gt;
The only downside could be if you fail to get the *end* result you expected (RIGHT match) then the next time you do the loop it will be returning TRUE all time even if the first one is never found.&lt;br /&gt;
&lt;br /&gt;
So you might want to plan for that possibility&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ .. m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as above but using ff name instead of the .. name of the operator (both are the same for a flip flop)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Lets make some text and imagine its the files text&lt;br /&gt;
my $FileText = &lt;br /&gt;
@&amp;quot;First line.&lt;br /&gt;
start&lt;br /&gt;
Indented line&lt;br /&gt;
end&lt;br /&gt;
Back to left margin&amp;quot;;&lt;br /&gt;
// Break the text into individual lines&lt;br /&gt;
my $lines = Lines($FileText);&lt;br /&gt;
// Loop through each line of the files text&lt;br /&gt;
// Notice we dont use &amp;quot;as&amp;quot; in the foreach?&lt;br /&gt;
// This will make it place each line into $_&lt;br /&gt;
// for us&lt;br /&gt;
foreach($lines)&lt;br /&gt;
{&lt;br /&gt;
    // Print a \t (tab) if the operator gets match&lt;br /&gt;
    // Or if it's in a TRUE state&lt;br /&gt;
    // Notice we dont specifiy a variable in the regexp?&lt;br /&gt;
    // This will cause it to use $_ automatically&lt;br /&gt;
    echo &amp;quot;\t&amp;quot; if(m/^start/ ff m/^end/);&lt;br /&gt;
    // Print the current line of the file&lt;br /&gt;
    // Of course $_ is the line from the foreach&lt;br /&gt;
    echo $_ . &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// PRINTS&lt;br /&gt;
// First line.&lt;br /&gt;
//         start&lt;br /&gt;
//         Indented line&lt;br /&gt;
//         end&lt;br /&gt;
// Back to left margin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A common thing with Flip Flop is to want to exclude one or both endpoints. To do this, you need to actually check the scalar value returned by the .. operator; it will be a number beginning at 1 when the flip condition is met and increasing once each time thereafter, with an &amp;quot;E0&amp;quot; appended when the flop condition is met. (False is returned as a boolean FALSE.)&lt;br /&gt;
&lt;br /&gt;
Exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if(((m/start/ .. m/end/) || 0) &amp;gt; 1);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regex alternative for exclude starting point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^(?!1(?!\d))\d/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
// end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude ending point&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// start&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exclude both endpoints&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $FileText = &amp;quot;initial\nstart\ninterior\nend\nfinal&amp;quot;;&lt;br /&gt;
foreach(Lines($FileText))&lt;br /&gt;
    echo &amp;quot;$_\n&amp;quot; if((m/start/ .. m/end/) =~ m/^\d+(?&amp;lt;!^1)$/);&lt;br /&gt;
// PRINTS&lt;br /&gt;
// interior&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // at and Dog&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be chained for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function many times&lt;br /&gt;
$result = $a-&amp;gt;&amp;gt;substr(1)-&amp;gt;&amp;gt;substr(0, 8)-&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print the result&lt;br /&gt;
say $result; // t and D&lt;br /&gt;
// Prints showing no changes happened to $a&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator =&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Variable as first arg assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Define a string&lt;br /&gt;
$a = &amp;quot;Cat and Dog&amp;quot;;&lt;br /&gt;
// Use the $a as the first arg of a function&lt;br /&gt;
// (this does not change $a unless the function changes it)&lt;br /&gt;
say $a-&amp;gt;&amp;gt;substr(1); // at and Dog&lt;br /&gt;
// Prints showing no changes&lt;br /&gt;
say $a; // Cat and Dog&lt;br /&gt;
&lt;br /&gt;
// Now lets try again but this time with =&amp;gt;&amp;gt;&lt;br /&gt;
// Use =&amp;gt;&amp;gt; to place $a as the first arg of a function&lt;br /&gt;
// then immediately set the return value to $a&lt;br /&gt;
$a=&amp;gt;&amp;gt;substr(1);&lt;br /&gt;
// Print it showing the change&lt;br /&gt;
say $a; // at and Dog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator x ====&lt;br /&gt;
&lt;br /&gt;
Repetition. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) x 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
// Can also do stuff like&lt;br /&gt;
print(&amp;quot;CAT\n&amp;quot;) x 100; //Prints CAT 101 times (counts the zero)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) x 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Prints:&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; One&lt;br /&gt;
    [3] =&amp;gt; Two&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator xx ====&lt;br /&gt;
&lt;br /&gt;
Repetition as array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$value = &amp;quot;Test&amp;quot; xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&lt;br /&gt;
$value = array(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;) xx 10;&lt;br /&gt;
printr $value;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on arrays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;) xx 2;&lt;br /&gt;
printr $a;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&lt;br /&gt;
        )&lt;br /&gt;
    [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [0] =&amp;gt; One&lt;br /&gt;
            [1] =&amp;gt; Two&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;
==== Operator [] ====&lt;br /&gt;
&lt;br /&gt;
Append to end of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Five&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator []! ====&lt;br /&gt;
&lt;br /&gt;
Append to beginning of array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $myArray = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$myArray[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$myArray[] = &amp;quot;Four&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
printr($myArray);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print array. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(1, 2, 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, $a[&amp;lt;&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; One&lt;br /&gt;
    [1] =&amp;gt; Two&lt;br /&gt;
    [2] =&amp;gt; Three&lt;br /&gt;
    [3] =&amp;gt; Four&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
Print hashmap. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $array = array(&amp;quot;Cat&amp;quot; =&amp;gt; 1, &amp;quot;Dog&amp;quot; =&amp;gt; 2, &amp;quot;FoX&amp;quot; =&amp;gt; 3);&lt;br /&gt;
println(&amp;quot;An $array[&amp;lt;=&amp;gt;]&amp;quot;);&lt;br /&gt;
// Or&lt;br /&gt;
println($array[&amp;lt;=&amp;gt;]);&lt;br /&gt;
// Or&lt;br /&gt;
println $array[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used with array creation &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = array(&amp;quot;Cat&amp;quot; =&amp;gt; &amp;quot;Meow&amp;quot;);&lt;br /&gt;
$b = array(&amp;quot;Dog&amp;quot; =&amp;gt; &amp;quot;Woof&amp;quot;, $a[&amp;lt;=&amp;gt;]);&lt;br /&gt;
printr $b;&lt;br /&gt;
/*&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [Dog] =&amp;gt; Woof&lt;br /&gt;
    [Cat] =&amp;gt; Meow&lt;br /&gt;
)&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator is ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a is Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b is Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a ~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Can be used for classes and other objects too&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$b = new Testy();&lt;br /&gt;
&lt;br /&gt;
if($b ~~ Testy)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an instance of class Testy&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a ~~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator isnot ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
&lt;br /&gt;
if($a isnot Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !~ ====&lt;br /&gt;
&lt;br /&gt;
Type checking. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Used to check if a variable is not a certain type&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a strict mode if you add an extra ~ example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = (int32)1;&lt;br /&gt;
if($a !~~ Int32)&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is NOT an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println(@&amp;quot;$a is an Int32&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator = ====&lt;br /&gt;
&lt;br /&gt;
Assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var = 5;     (assigns the number 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ++ ====&lt;br /&gt;
&lt;br /&gt;
Increase assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++;     (adds 1 to $var) // Returns x, then increments x by one&lt;br /&gt;
++$var;     (adds 1 to $var) // Increments x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var+++;     (adds 2 to $var)&lt;br /&gt;
+++$var;     (adds 2 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var++++++;     (adds 5 to $var)&lt;br /&gt;
++++++$var;     (adds 5 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sputnik follows Perl's convention when dealing with arithmetic operations on character variables and not C's.&lt;br /&gt;
&lt;br /&gt;
For example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91).&lt;br /&gt;
&lt;br /&gt;
Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported.&lt;br /&gt;
&lt;br /&gt;
Incrementing/decrementing other character variables has no effect, the original string is unchanged.&lt;br /&gt;
&lt;br /&gt;
==== Operator -- ====&lt;br /&gt;
&lt;br /&gt;
Decrease assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var--;     (subs 1 from $var) // Returns x, then decrements x by one&lt;br /&gt;
--$var;     (subs 1 from $var) // Decrements x by one, then returns x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It can also go infinity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var---;     (subs 2 from $var)&lt;br /&gt;
---$var;     (subs 2 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var------;     (subs 5 from $var)&lt;br /&gt;
------$var;     (subs 5 from $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator += ====&lt;br /&gt;
&lt;br /&gt;
Addition assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var += 1;     (adds 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator -= ====&lt;br /&gt;
&lt;br /&gt;
Subtraction assignment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var -= 1;     (subs 1 to $var)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator /= ====&lt;br /&gt;
&lt;br /&gt;
Division  assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (divive $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator *= ====&lt;br /&gt;
&lt;br /&gt;
Multiplication assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var /= 2;     (multiply $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator **= ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var **= 2;     (raise $var by 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator |= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var |= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator %= ====&lt;br /&gt;
&lt;br /&gt;
Modulus assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var %= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT LEFT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;lt;&amp;lt;&amp;lt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT RIGHT assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;gt;&amp;gt;&amp;gt;= 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ||= ====&lt;br /&gt;
&lt;br /&gt;
OR assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x ||= 0;   # If $x was false, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
AND assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$x &amp;amp;&amp;amp;= 0;   # If $x was true, it now has a value of 0.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator .= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to end of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var .= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ..= ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings (Adds text to beginning of variable) assignment. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var ..= &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator + ====&lt;br /&gt;
&lt;br /&gt;
Adds two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 + 20;    (equals 30)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator - ====&lt;br /&gt;
&lt;br /&gt;
Subtracts two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 - 10;    (equals 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Negate a number.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = -10;    (equals -10)&lt;br /&gt;
$b = -$a;    (equals 10 because it will flip-flop)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator * ====&lt;br /&gt;
&lt;br /&gt;
Multiplies two numbers.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 * 10;    (equals 200)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resolves reference.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$p = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$test = &amp;amp;$p;&lt;br /&gt;
echo(*$test);    (Resolves the pointer so $test will appear&lt;br /&gt;
                  as if $p was there instead)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator / ====&lt;br /&gt;
&lt;br /&gt;
Divides two numbers. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20 / 10;    (equals 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ** ====&lt;br /&gt;
&lt;br /&gt;
Raises a number to the power.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2 ** 4;    (equals 16) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator | ====&lt;br /&gt;
&lt;br /&gt;
BitwiseOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ^= ====&lt;br /&gt;
&lt;br /&gt;
BitwiseExclusiveOR. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var | 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseAND. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var &amp;amp; 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference creator. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
$p = &amp;amp;$test; // Now $p links to $test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator % ====&lt;br /&gt;
&lt;br /&gt;
Modulus. e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$var % 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt; 2;    (equals 56 because 1110b left-shifted twice is 111000b == 56) &lt;br /&gt;
14 &amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt; 2;    (equals 3 because 1110b right-shifted twice is 11b == 3) &lt;br /&gt;
14 &amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Right.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; 2;&lt;br /&gt;
14 &amp;gt;&amp;gt;&amp;gt; -12;  (same a doing 14 &amp;lt;&amp;lt;&amp;lt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
BitwiseUnsignedSHIFT Left.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; 2;&lt;br /&gt;
14 &amp;lt;&amp;lt;&amp;lt; -12;  (same a doing 14 &amp;gt;&amp;gt;&amp;gt; 12) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ~ ====&lt;br /&gt;
&lt;br /&gt;
BitwiseNOT.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~ 5;&lt;br /&gt;
    ; Result is -6 because for 32-bit numbers&lt;br /&gt;
    ; 5 == 00000000000000000000000000000101 binary&lt;br /&gt;
    ; -6 == 11111111111111111111111111111010 binary&lt;br /&gt;
    ; and the first bit is signed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator . ====&lt;br /&gt;
&lt;br /&gt;
Concatenates/joins two strings/arrays/binary etc.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;one&amp;quot; . 10;    (equals &amp;quot;one10&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator == ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator === ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are equal and the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
//define variables..  &lt;br /&gt;
$str = '9';  &lt;br /&gt;
$int = 9;  &lt;br /&gt;
  &lt;br /&gt;
//Returns true since both variable contains the same value..  &lt;br /&gt;
$res = ($str==$int); &lt;br /&gt;
println(&amp;quot;Str '9' == Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//Returns false since the two variables are not of the same type..  &lt;br /&gt;
$res = ($str===$int);&lt;br /&gt;
println(&amp;quot;Str '9' === Int 9; &amp;quot; . ($res ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator != ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator !== ====&lt;br /&gt;
&lt;br /&gt;
Tests if two values are not equal and not the same type (case sensitive if used with strings)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second.&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;=&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Test if second value value is lower , equal or higher respectively than the first value returning as either: -1 0 1&lt;br /&gt;
&lt;br /&gt;
==== Operator eq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator eqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neq ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator neqi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are not equal (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmp ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case sensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator cmpi ====&lt;br /&gt;
&lt;br /&gt;
Tests if two objects (treated as strings) are lower(-1), equal (0) or higher (1) (case insensitive)&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator le ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gt ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator ge ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is less than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gti ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator gei ====&lt;br /&gt;
&lt;br /&gt;
Tests if the first value is greater than or equal to the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lg ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator lgi ====&lt;br /&gt;
&lt;br /&gt;
Test if first value is lower or higher than the second (both treated as strings, case insensitive).&lt;br /&gt;
&lt;br /&gt;
(Can be used on arrays)&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this &amp;amp;&amp;amp; $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator And ====&lt;br /&gt;
&lt;br /&gt;
Logical AND operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this AND $that)     (If $this is true, return $that, else return $this)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if both are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator || ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this || $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator Or ====&lt;br /&gt;
&lt;br /&gt;
Logical OR operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($this OR $that)     (If $this is true, return $this, else return $that.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words if either are TRUE the if will accept the statement as TRUE otherwise it wont.&lt;br /&gt;
&lt;br /&gt;
==== Operator ! ====&lt;br /&gt;
&lt;br /&gt;
Logical NOT operation.  e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If(!$var == 5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ?? ====&lt;br /&gt;
&lt;br /&gt;
NULL switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = null;&lt;br /&gt;
println( $a ?? &amp;quot;The variable is null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !! ====&lt;br /&gt;
&lt;br /&gt;
Not null switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$a = 10;&lt;br /&gt;
println( $a !! &amp;quot;The variable is not null&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator ? : ====&lt;br /&gt;
&lt;br /&gt;
Boolean expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
if( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another interesting way to use ? : operator is with the @( ) brace notice it will allow $cat to increase and yet still return &amp;quot;no&amp;quot; to the argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cat = 10;&lt;br /&gt;
$dog = 2;&lt;br /&gt;
&lt;br /&gt;
$value = $dog == 1 ? &amp;quot;yes&amp;quot; : @($cat++,&amp;quot;no&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
say &amp;quot;Cat is $cat&amp;quot;;&lt;br /&gt;
say &amp;quot;Dog is $dog&amp;quot;;&lt;br /&gt;
say &amp;quot;Value is $value&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator !? : ====&lt;br /&gt;
&lt;br /&gt;
Booleon expression TRUE or FALSE switch. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Println ( 1 == 2 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Heres an example of why it looks better&lt;br /&gt;
unless( $a == 100 )&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;False&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	println ( &amp;quot;True&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Is best written like so&lt;br /&gt;
println ( $a == 100 !? &amp;quot;False&amp;quot; : &amp;quot;True&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 );&lt;br /&gt;
println( &amp;quot;Goodbye World&amp;quot; ) if( $test == 200 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator &amp;lt;stm&amp;gt; if( &amp;lt;expression&amp;gt; ) else &amp;lt;stm&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Execute code if expression TRUE else execute other code. eg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$test = 200;&lt;br /&gt;
println( &amp;quot;Hello World&amp;quot; ) if( $test == 100 ) else println( &amp;quot;Goodbye World&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[If|If...Else ]]&lt;br /&gt;
* [[Unless|Unless...Then...Else ]]&lt;br /&gt;
* [[Select|Select...Case..Default]]&lt;br /&gt;
* [[Switch|Switch...Case..Default]]&lt;br /&gt;
&lt;br /&gt;
=== Using Statement ===&lt;br /&gt;
* [[Using|Using]]&lt;br /&gt;
&lt;br /&gt;
=== With Statement ===&lt;br /&gt;
* [[With|With]]&lt;br /&gt;
&lt;br /&gt;
=== Loop Statements ===&lt;br /&gt;
&lt;br /&gt;
* [[For Loop|For]]&lt;br /&gt;
* [[Foreach As Loop|Foreach...As]]&lt;br /&gt;
* [[Foreach As Key Value Loop|Foreach...As...Key...Value]]&lt;br /&gt;
* [[While Loop|While]]&lt;br /&gt;
* [[Until Loop|Until]]&lt;br /&gt;
* [[Do While Loop|Do..While]]&lt;br /&gt;
* [[Do Until Loop|Do..Until]]&lt;br /&gt;
&lt;br /&gt;
=== Exception Handling ===&lt;br /&gt;
* [[Try Catch Finally|Try..Catch..Finally]]&lt;br /&gt;
&lt;br /&gt;
=== Preprocessor ===&lt;br /&gt;
Sputnik has a built in preprocessor that can do a number of useful things for you check it out here.&lt;br /&gt;
* [[Preprocessor|Preprocessor]]&lt;br /&gt;
&lt;br /&gt;
=== User Defined &amp;amp; Core Language Functions ===&lt;br /&gt;
&lt;br /&gt;
There is many functions built into language for easy use for a list go here&lt;br /&gt;
&lt;br /&gt;
* [[Function Reference|Function Reference]]&lt;br /&gt;
&lt;br /&gt;
There are also functions created using Sputnik that you can include in your projects and use.&lt;br /&gt;
&lt;br /&gt;
To create your own funtions see the Function page.&lt;br /&gt;
&lt;br /&gt;
* [[User Function|User Defined Functions]]&lt;br /&gt;
&lt;br /&gt;
=== Character Sets ===&lt;br /&gt;
&lt;br /&gt;
There are many macros that contain character sets go [[Macros|here]] for a complete list.&lt;br /&gt;
&lt;br /&gt;
This takes numeric values same as AscW() and returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = c65..c70;&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$b = array(c65..c70);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This takes 2 chars returns a string or array&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 'A'..'F';&lt;br /&gt;
print($a); // Prints ABCDEF&lt;br /&gt;
&lt;br /&gt;
$a = 'A'..'F' . 'a'..'f' . '0'..'9';&lt;br /&gt;
print($a); // Prints ABCDEFabcdef0123456789&lt;br /&gt;
&lt;br /&gt;
$a = '0'..'9';&lt;br /&gt;
print($a); // Prints 0123456789&lt;br /&gt;
&lt;br /&gt;
$a = 'z'..'a';&lt;br /&gt;
print($a); // Prints zyxwvutsrqponmlkjihgfedcba&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$b = array('A'..'F','a'..'f','0'..'9');&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints A,B,C,D,E,F,a,b,c,d,e,f,0,1,2,3,4,5,6,7,8,9,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes decimals and returns string&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$a = 0..20;&lt;br /&gt;
print($a); // Prints 01234567891011121314151617181920&lt;br /&gt;
&lt;br /&gt;
$b = array(0..20);&lt;br /&gt;
foreach($b as $c)&lt;br /&gt;
{&lt;br /&gt;
	print(&amp;quot;$c,&amp;quot;); // Prints 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# is used a line comment&lt;br /&gt;
// is used as a line command&lt;br /&gt;
\* */ is used as a multiline comment&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
anything you put inside&lt;br /&gt;
this is classed as&lt;br /&gt;
part of the line comment&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/User_Function</id>
		<title>User Function</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/User_Function"/>
				<updated>2015-09-20T10:08:21Z</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;
Function &amp;lt;name&amp;gt; ( &amp;lt;Parameters&amp;gt; ... )&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the function already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!FunctionExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the function using the Embedded keyword&lt;br /&gt;
	Embedded Function Cat()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
Cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
==== Important Examples ====&lt;br /&gt;
&lt;br /&gt;
===== Parameters as pointers =====&lt;br /&gt;
&lt;br /&gt;
You can pass variables as a pointer to a function so the function can modify them variables directly rather than work on a copy of them.&lt;br /&gt;
&lt;br /&gt;
The only real benefit of doing this is it speeds up execution time by not having to copy the variable.&lt;br /&gt;
&lt;br /&gt;
This is only useful when used on arrays especially very big arrays.&lt;br /&gt;
&lt;br /&gt;
To make a pointer you use &amp;amp; like in C++ and place it in parameter section of the function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Make a string&lt;br /&gt;
my $MyString = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Print it&lt;br /&gt;
say $MyString; // Prints &amp;quot;Hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Fail to modify it&lt;br /&gt;
Test($MyString);&lt;br /&gt;
&lt;br /&gt;
// Print to prove fail&lt;br /&gt;
say $MyString; // Prints &amp;quot;Hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Correctly modify it&lt;br /&gt;
Test2($MyString);&lt;br /&gt;
&lt;br /&gt;
// Print modified string&lt;br /&gt;
say $MyString; // Prints &amp;quot;Hello world!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// A function that does not use a pointer&lt;br /&gt;
// so any modifications to the variable&lt;br /&gt;
// do not leave the function since it is&lt;br /&gt;
// only playing with a *copy*&lt;br /&gt;
Function Test($str)&lt;br /&gt;
{&lt;br /&gt;
	$str .= &amp;quot; world!&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// A function that does use a pointer so&lt;br /&gt;
// any modifications that take place do&lt;br /&gt;
// indeed change the variable&lt;br /&gt;
Function Test2(&amp;amp;$str)&lt;br /&gt;
{&lt;br /&gt;
	$str .= &amp;quot; world!&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Unlimited Function Parameters =====&lt;br /&gt;
&lt;br /&gt;
If you’ve most likely noticed that several function such as println() can take an indeterminate number of arguments. Normally when defining a function you specify each argument in the function declaration. Obviously it would be impossible to define an infinite number of arguments in such a way. Sputnik does, however, allow you to accomplish this through the array @args.&lt;br /&gt;
&lt;br /&gt;
@args is an array consisting of all of the arguments passed to a function. Using this method you can bypass the conventional method of defining parameters in the function definition all-together.&lt;br /&gt;
&lt;br /&gt;
However @args is not created by default and you must activate it if you wish to use it.&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( Add(1, 2, 3) ); // will return 6&lt;br /&gt;
&lt;br /&gt;
// Allow the @args variable to be made (we will use it)&lt;br /&gt;
// you place this above a function to allow @Args&lt;br /&gt;
// the reason is becaus the creation of @Args involves&lt;br /&gt;
// creating an array and pushing items onto it etc and&lt;br /&gt;
// can use a tiny bit of processing power so we don't do&lt;br /&gt;
// it unless we want to do it&lt;br /&gt;
[Args(&amp;quot;true&amp;quot;)]&lt;br /&gt;
Function Add()&lt;br /&gt;
{&lt;br /&gt;
	my $Total = 0;&lt;br /&gt;
	foreach( @args as my $item )&lt;br /&gt;
	{&lt;br /&gt;
		$Total += $item;&lt;br /&gt;
	}&lt;br /&gt;
	return $Total;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for whatever reason you need to know the total number of arguments passed to a function, You can simply use Count($args) within the function.&lt;br /&gt;
&lt;br /&gt;
When retrieving arguments in this manner it is important to remember that @args only contains an array of arguments passed by the user. It does not account for default values etc.&lt;br /&gt;
&lt;br /&gt;
Note - If outside a function @args will return an empty array.&lt;br /&gt;
&lt;br /&gt;
Since @args exists it is possible to use that as the function parameters... Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
doMsg(&amp;quot;Hello&amp;quot;, 777);&lt;br /&gt;
&lt;br /&gt;
[Args(&amp;quot;true&amp;quot;)]&lt;br /&gt;
Function doMsg()&lt;br /&gt;
{&lt;br /&gt;
	my List( $msg, $code ) = @args;&lt;br /&gt;
	echo &amp;quot;$msg | $code&amp;quot;; // Prints: Hello | 777&lt;br /&gt;
}&lt;br /&gt;
// This tends to work very similar to the @_ in perl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Function Rules =====&lt;br /&gt;
&lt;br /&gt;
You can add special rules to your function to tell it how to operate using the [] brackets before the word &amp;quot;Function&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is a list of the possible rules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TYPE                   WHAT IT DOES&lt;br /&gt;
Args                   Allows enabling the creation of @ARGS variable&lt;br /&gt;
Returns                Forces a specific return type to the function&lt;br /&gt;
                       (gives exception if wrong type is given)&lt;br /&gt;
ReturnCast             Casts all return values to this type if it is not already&lt;br /&gt;
Override               Overrides a CORE function with this name and forces all&lt;br /&gt;
                       call to that function to route to you function instead&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Default for the rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TYPE                   DEFAULT&lt;br /&gt;
Args                   FALSE&lt;br /&gt;
Returns                &amp;lt;totally disabled&amp;gt;&lt;br /&gt;
ReturnCast             &amp;lt;totally disabled&amp;gt;&lt;br /&gt;
Override               FALSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a list of data type to use with Returns/ReturnCast see [[Core Function GetVarType|HERE]].&lt;br /&gt;
&lt;br /&gt;
Example of using Rule: Args&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// The @Args variable is a special variable&lt;br /&gt;
// that can be used in any function it is used to&lt;br /&gt;
// handle infinite params the same as perls @_&lt;br /&gt;
// param 0 is @Args[0] and so on...&lt;br /&gt;
// If you wish to use infinite parameters thenb&lt;br /&gt;
// you must enable this rule.&lt;br /&gt;
println(&amp;quot;### First no rule&amp;quot;);&lt;br /&gt;
Test(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;);&lt;br /&gt;
println(&amp;quot;### Now with rule&amp;quot;);&lt;br /&gt;
TestWithRule(&amp;quot;Cat&amp;quot;, &amp;quot;Dog&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// A test function with no rules so @args should NOT be created&lt;br /&gt;
Function Test($a, $b)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;\$a: $a \$b: '$b'&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\@args[0]: @args[0] \@args[1]: '@args[1]'&amp;quot;);&lt;br /&gt;
	printr(@args);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// This function is same as above but this time with the rule&lt;br /&gt;
[Args(&amp;quot;true&amp;quot;)]&lt;br /&gt;
Function TestWithRule($a, $b)&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;\$a: $a \$b: '$b'&amp;quot;);&lt;br /&gt;
	println(&amp;quot;\@args[0]: @args[0] \@args[1]: '@args[1]'&amp;quot;);&lt;br /&gt;
	printr(@args);&lt;br /&gt;
}&lt;br /&gt;
// Notice the test without the rule had no @args variable at all?&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using Rule: Returns&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
print(vardump(Test(true)));&lt;br /&gt;
print(vardump(Test(false)));&lt;br /&gt;
&lt;br /&gt;
[Returns(&amp;quot;bool&amp;quot;)]&lt;br /&gt;
Function Test( $returnBool )&lt;br /&gt;
{&lt;br /&gt;
	if($returnBool)&lt;br /&gt;
		return 1 == 2;&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;Hello&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// This forces this function to require a bool to be returned&lt;br /&gt;
// if a bool is not returned it will throw an exception instantly&lt;br /&gt;
// it will not try to convert the return to a bool&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using Rule: ReturnCast&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
[ReturnCast(&amp;quot;bool&amp;quot;)]&lt;br /&gt;
Function Test( $returnBool )&lt;br /&gt;
{&lt;br /&gt;
	if($returnBool)&lt;br /&gt;
		return 1 == 2;&lt;br /&gt;
	else&lt;br /&gt;
		return 1;&lt;br /&gt;
}&lt;br /&gt;
// This forces this function to return a bool no matter what&lt;br /&gt;
// It will even return the default value (0 for ints, false for bool etc)&lt;br /&gt;
// if it cannot convert or find a return value at all&lt;br /&gt;
// If there is a return value it will converted to a bool&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using Rule: Override&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Print(&amp;quot;Moo moo farm&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
[Override(&amp;quot;true&amp;quot;)]&lt;br /&gt;
Function Print()&lt;br /&gt;
{&lt;br /&gt;
	say &amp;quot;HELLO?!?!??&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
// This forces all calls to Print() (core) function to go to your&lt;br /&gt;
// function instead this can prove useful if you are extending&lt;br /&gt;
// the functionality of a core function.&lt;br /&gt;
// Be careful however since Sputnik might want to call one of the&lt;br /&gt;
// cores and suddenly find it does not exist and behave in weird and/or&lt;br /&gt;
// disastrous way. &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== General Examples ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( Add(1, 2) ); // will return 3&lt;br /&gt;
&lt;br /&gt;
Function Add($a, $b)&lt;br /&gt;
{&lt;br /&gt;
	return $a + $b;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( Add(2) ); // will return 52&lt;br /&gt;
println( Add(2, 4) ); // will return 6&lt;br /&gt;
&lt;br /&gt;
Function Add($a, $b = 50)&lt;br /&gt;
{&lt;br /&gt;
	return $a + $b;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
println( Add() ); // will return 60&lt;br /&gt;
println( Add(2) ); // will return 52&lt;br /&gt;
println( Add(2, 4) ); // will return 6&lt;br /&gt;
&lt;br /&gt;
Function Add($a = 10, $b = 50)&lt;br /&gt;
{&lt;br /&gt;
	return $a + $b;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example we dont include the ( ) on the function and by not including it the function will automatically assumes you plan to use the @args variable and will enable it for you&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Test(&amp;quot;CAT&amp;quot;, 111);&lt;br /&gt;
Function Test&lt;br /&gt;
{&lt;br /&gt;
	my List ($Name, $Password) = @args;&lt;br /&gt;
	println(&amp;quot;Name '$Name' Password '$Password'&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:User Defined Functions]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-20T10:06:54Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: /* Remarks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$ID;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
# UniqueID: 5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not need to define a GET or SET accessor.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Embedding ===&lt;br /&gt;
&lt;br /&gt;
A class can be embedded inside an IF statement (or any statement) so that it can be created on a conditional for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Check if the class already exists and&lt;br /&gt;
// if it does already exists don't create it&lt;br /&gt;
if (!ClassExists(&amp;quot;Cat&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	// Create the class using the Embedded keyword&lt;br /&gt;
	Embedded Class Cat&lt;br /&gt;
	{&lt;br /&gt;
		Function __construct()&lt;br /&gt;
		{&lt;br /&gt;
			say &amp;quot;testy!&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
	}; // note ; is required here&lt;br /&gt;
}&lt;br /&gt;
$a = new cat();&lt;br /&gt;
// PRINTS&lt;br /&gt;
// testy!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php/Classes</id>
		<title>Classes</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php/Classes"/>
				<updated>2015-09-20T10:04:10Z</updated>
		
		<summary type="html">&lt;p&gt;UberFoX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE - Everything listed on this page DOES work even tho there are not examples for everything they do indeed work if you wish to try it out.&lt;br /&gt;
&lt;br /&gt;
Rather unconventionally Sputnik requires a ; to end a class statement although not a limitation of the parser but I just thought it looked cool.&lt;br /&gt;
&lt;br /&gt;
Regular class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extender class that adds functions and features to an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class extends &amp;lt;name&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from an existing class :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inheritance class that inherits functions and features from multiple existing classes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class &amp;lt;name&amp;gt; extends &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;, &amp;lt;parentname&amp;gt;...&lt;br /&gt;
{&lt;br /&gt;
	statements&lt;br /&gt;
	...&lt;br /&gt;
	functions&lt;br /&gt;
	...&lt;br /&gt;
	operator overloads&lt;br /&gt;
	...&lt;br /&gt;
	casting overloads&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&lt;br /&gt;
==== Statements ====&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Static Variables ====&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
A property works like a normal variable however instead of returning or setting a variable it executes code when you try get/set the variable take the example below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	# Define a new property&lt;br /&gt;
	my $Test &lt;br /&gt;
	{ # Rquired block for it&lt;br /&gt;
		get # Define the GET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Getting the value&amp;quot;;&lt;br /&gt;
			return $Test;&lt;br /&gt;
		}&lt;br /&gt;
		set # Define the SET accessor&lt;br /&gt;
		{ # Its block and code to execute&lt;br /&gt;
			say &amp;quot;Setting to $value&amp;quot;;&lt;br /&gt;
			$Test = $value;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new cat();&lt;br /&gt;
$a-&amp;gt;$Test = 77;&lt;br /&gt;
say &amp;quot;Value: &amp;quot; . $a-&amp;gt;$Test;&lt;br /&gt;
&lt;br /&gt;
# Prints&lt;br /&gt;
# Setting to 77&lt;br /&gt;
# Getting the value&lt;br /&gt;
# Value: 77&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the GET or SET block the property name becomes a variable so $Test is a property but inside the GET or SET it is a variable like any other and you can get/set to it of course you can choose to ignore the variable entirely and do anything you want inside the GET/SET.&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* All properties are public and cannot be private however you could restrict the property to only the GET accessor if you wish.&lt;br /&gt;
* You can have only one GET accessor.&lt;br /&gt;
* You can have only one SET accessor.&lt;br /&gt;
* You may have one of each&lt;br /&gt;
* If you somehow create a normal variable with the same name as the property it will override the property.&lt;br /&gt;
&lt;br /&gt;
==== Abstract Properties ====&lt;br /&gt;
&lt;br /&gt;
Works exactly same as property above but this time it will be marked as abstract so any class inheriting our class must implement a property by the same name as this one. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class cat&lt;br /&gt;
{&lt;br /&gt;
	Abstract my $ID { }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class foo extends cat&lt;br /&gt;
{&lt;br /&gt;
	my $ID&lt;br /&gt;
	{&lt;br /&gt;
		get&lt;br /&gt;
		{&lt;br /&gt;
			return ++$ID;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new foo();&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
say &amp;quot;UniqueID: &amp;quot; . $a-&amp;gt;$ID;&lt;br /&gt;
# Prints&lt;br /&gt;
# UniqueID: 1&lt;br /&gt;
# UniqueID: 2&lt;br /&gt;
# UniqueID: 3&lt;br /&gt;
# UniqueID: 4&lt;br /&gt;
# UniqueID: 5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of note :&lt;br /&gt;
* Since this is an abstract class you do not need to define a GET or SET accessor.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
==== Public Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public.&lt;br /&gt;
&lt;br /&gt;
==== Private Functions ====&lt;br /&gt;
&lt;br /&gt;
By default all functions are public and there is no *Public* keyword since they are automatically public however if you want a function to be private you must insert the &amp;quot;Private&amp;quot; keyword before the function.&lt;br /&gt;
&lt;br /&gt;
Once private is defined you can call the function by name inside the class and by using $this-&amp;gt; but you can't call the function from outside the class this will prevent people from using functions that could cause functions such as internal functions that must only be used by the class itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Made...&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function Testy()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Testy&amp;quot;;&lt;br /&gt;
		Foo(&amp;quot;Called from class&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;Foo(&amp;quot;Called from class THIS&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Private Function Foo($value)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Foo: $value&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a-&amp;gt;Testy();&lt;br /&gt;
$a-&amp;gt;Foo(&amp;quot;called from pointer&amp;quot;); # Fails cannot access private function&lt;br /&gt;
# Prints&lt;br /&gt;
# Made...&lt;br /&gt;
# Testy&lt;br /&gt;
# Foo: Called from class&lt;br /&gt;
# Foo: Called from class THIS&lt;br /&gt;
&lt;br /&gt;
# then throws an exception&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Static Functions ====&lt;br /&gt;
&lt;br /&gt;
Static functions can't be private.&lt;br /&gt;
&lt;br /&gt;
==== Magic Functions ====&lt;br /&gt;
&lt;br /&gt;
A magic function is basically a function that starts with __ and gets executed when a specific core function is used with the class variable in its context here is an example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Test&lt;br /&gt;
{&lt;br /&gt;
	my $data = array(); # A simple array to hold our data&lt;br /&gt;
	Function __Construct() # Is called when you do new ClassName()&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Construct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Destruct() # Is called when you do unset($class)&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Destruct() called&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Set($key, $value) # Is called when you do $class['key'] = &lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Set() called with key '$key' and value '$value'&amp;quot;;&lt;br /&gt;
		$data[$key] = $value;&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __Get($key) # Is called when you do $class['key']&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Get() called with key '$key'&amp;quot;;&lt;br /&gt;
		return $data[$key];&lt;br /&gt;
	}&lt;br /&gt;
	Function __Unset($key) # Is called when you do unset($class['key'])&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;__Unset() called with key '$key'&amp;quot;;&lt;br /&gt;
		unset($data[$key]);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	Function __IsSet($key) # Is called when you do isset($class['key']) or isset($class)&lt;br /&gt;
	{&lt;br /&gt;
		# The key will be NULL if this was called using isset($class)&lt;br /&gt;
		say &amp;quot;__IsSet() called with key '$key'&amp;quot;;&lt;br /&gt;
		return isset($data[$key]);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Call() # Is called when you do $class() and try use it as a function&lt;br /&gt;
	{&lt;br /&gt;
		say &amp;quot;Hello from _Call&amp;quot;; # we could use params and return a value&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintAll() # Just print the current data the class holds&lt;br /&gt;
	{&lt;br /&gt;
		printr $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$a = new Test();&lt;br /&gt;
$a(); # Treat the class as a function&lt;br /&gt;
$a['Foo'] = &amp;quot;Bar&amp;quot;; # Set key 'Foo' to 'Bar'&lt;br /&gt;
$a['Cat'] = &amp;quot;Meow&amp;quot;; # Set key 'Cat' to 'Meow'&lt;br /&gt;
say &amp;quot;Foo is: &amp;quot; . $a['Foo']; # Get key 'Foo'&lt;br /&gt;
say isset($a); # Check if the class itself is set&lt;br /&gt;
say isset($a['Foo']); # Check if the key 'Foo' is set&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a['Foo']); # Unset the key 'Foo'&lt;br /&gt;
$a-&amp;gt;PrintAll(); # Print what the class contains&lt;br /&gt;
unset($a); # dispose of the class&lt;br /&gt;
printr(vardump($a)); # NULL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operator Overloads ====&lt;br /&gt;
&lt;br /&gt;
==== Cast Overloads ====&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
=== Creating Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Using Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Extending Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Multiple Inheritance Classes ===&lt;br /&gt;
&lt;br /&gt;
=== Cast Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload all the castings such as (int)value etc this is useful if you have a class that uses multiple variables and you would like them all added together each time you use (float)$myclass (or any cast you are doing such as (string) also it will run the cast if the function you are using wants to convert the variable into a string such as print()).&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: null ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: char ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: byte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: sbyte ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uint64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int16 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int32 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: int64 ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: intptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: uintptr ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: long ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: float ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: double ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: string ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Account&lt;br /&gt;
{&lt;br /&gt;
	my $Name;&lt;br /&gt;
	my $Credits;&lt;br /&gt;
	Function __construct($Name = &amp;quot;&amp;quot;, $Credits = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Name = $Name;&lt;br /&gt;
		$this-&amp;gt;$Credits = $Credits;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;string&amp;quot; // This will be done whenever somebody uses (string)$ourclass&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;Account '$Name' Credits '$Credits'&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$nacc = New Account(&amp;quot;FoX&amp;quot;, 777);&lt;br /&gt;
println( (string)$nacc ); // Prints Account 'FoX' Credits '777'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading Cast: binary ====&lt;br /&gt;
&lt;br /&gt;
=== Operator Overloading ===&lt;br /&gt;
&lt;br /&gt;
Sputnik allows you to overload a vast array of operators on your classes this is very helpful for all kinds of things example imagine you have a class that contains 3 varibles X Y and Z and you want to add another classes variables X Y Z onto yours creating a += operator you could quite simply do just that example:&lt;br /&gt;
&lt;br /&gt;
Without overloads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1-&amp;gt;$x += $vec2-&amp;gt;$x;&lt;br /&gt;
$vec1-&amp;gt;$y += $vec2-&amp;gt;$y;&lt;br /&gt;
$vec1-&amp;gt;$z += $vec2-&amp;gt;$z;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we needed 3 lines of code to do that and doing this over and over in many places of the code will cause a lot of repeat code also what if later we decide we need to add a third variable after z? We would need to go back and change everything...&lt;br /&gt;
&lt;br /&gt;
However if we overload the += operator we can do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$vec1 += $vec2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See how much easier that was? And if we add a new variable or even several later we can just fix our single += overload function and it will automatically fix every single peice of += in your code that uses it.&lt;br /&gt;
&lt;br /&gt;
See the examples below for what you can overload and exactly how to do just that.&lt;br /&gt;
&lt;br /&gt;
==== Overloading = ====&lt;br /&gt;
&lt;br /&gt;
You can overload the = such as $a = 10;&lt;br /&gt;
&lt;br /&gt;
However you must remember once this is overloaded you cant change the variable by simply $a = null;&lt;br /&gt;
&lt;br /&gt;
Since it will just use the overloaded function instead of setting the variable.&lt;br /&gt;
&lt;br /&gt;
To delete a variable you have given = casting to you must use unset($a); instead.&lt;br /&gt;
&lt;br /&gt;
==== Overloading += ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading -= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading *= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading **= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading /= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading %= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading .= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ..= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading |= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ||= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading | ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ^ ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading + ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading - ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading * ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ** ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading / ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading % ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading . ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;lt;&amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;&amp;gt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ++ ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;++&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x++;&lt;br /&gt;
		$this-&amp;gt;$y++;&lt;br /&gt;
		$this-&amp;gt;$z++;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1++;&lt;br /&gt;
println(&amp;quot;AFTER ++&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE ++&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER ++&lt;br /&gt;
// Class variable X: 11&lt;br /&gt;
// Class variable Y: 21&lt;br /&gt;
// Class variable Z: 31&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading -- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Vec3&lt;br /&gt;
{&lt;br /&gt;
	my $x = 0;&lt;br /&gt;
	my $y = 0;&lt;br /&gt;
	my $z = 0;&lt;br /&gt;
	Function __construct($x1 = 0, $y1 = 0, $z1 = 0)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x = $x1;&lt;br /&gt;
		$this-&amp;gt;$y = $y1;&lt;br /&gt;
		$this-&amp;gt;$z = $z1;&lt;br /&gt;
	}&lt;br /&gt;
	Operator &amp;quot;--&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$x--;&lt;br /&gt;
		$this-&amp;gt;$y--;&lt;br /&gt;
		$this-&amp;gt;$z--;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
$cat1 = new Vec3(10, 20, 30);&lt;br /&gt;
println(&amp;quot;BEFORE --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
$cat1--;&lt;br /&gt;
println(&amp;quot;AFTER --&amp;quot;);&lt;br /&gt;
println(&amp;quot;Class variable X: &amp;quot; . $cat1-&amp;gt;$x);&lt;br /&gt;
println(&amp;quot;Class variable Y: &amp;quot; . $cat1-&amp;gt;$y);&lt;br /&gt;
println(&amp;quot;Class variable Z: &amp;quot; . $cat1-&amp;gt;$z);&lt;br /&gt;
// Prints&lt;br /&gt;
// BEFORE --&lt;br /&gt;
// Class variable X: 10&lt;br /&gt;
// Class variable Y: 20&lt;br /&gt;
// Class variable Z: 30&lt;br /&gt;
// AFTER --&lt;br /&gt;
// Class variable X: 9&lt;br /&gt;
// Class variable Y: 19&lt;br /&gt;
// Class variable Z: 29&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading == ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading === ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading != ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading !== ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;gt;= ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;lt;&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading eqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neq ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading neqi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmp ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading cmpi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gt ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading le ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading ge ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lti ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading gei ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lg ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading lgi ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading || ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading &amp;amp;&amp;amp; ====&lt;br /&gt;
&lt;br /&gt;
==== Overloading [] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading []! ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function PrintMe()&lt;br /&gt;
	{&lt;br /&gt;
		println(&amp;quot;Values BELOW&amp;quot;);&lt;br /&gt;
		printr($Values);&lt;br /&gt;
		println(&amp;quot;Values ABOVE&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you don't get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesn't yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		// &amp;amp; means return a pointer to new index&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
// Now we use use the new index that was returned and place stuff in it&lt;br /&gt;
// However it is being returned as a POINTER so to make use of it we&lt;br /&gt;
// resolve it back into a variable using the * symbol.&lt;br /&gt;
// * Causes a pointer to become as if it was the actual object.&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
$Testy-&amp;gt;PrintMe();&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	my $Values;&lt;br /&gt;
	Function __Construct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A new Testy() class was made&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	Function __Deconstruct()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;$Values = array();&lt;br /&gt;
		println(&amp;quot;A Testy() class was destroyed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [] operator&lt;br /&gt;
	// Note that you dont get the value that is going to&lt;br /&gt;
	// to the [] this is because Sputnik doesnt yet know&lt;br /&gt;
	// what is going inside it however it knows the array&lt;br /&gt;
	// must be extended to allow something to go inside it.&lt;br /&gt;
	// So we simply extend the array and return a pointer to it&lt;br /&gt;
	// This will allow the array element to be set later&lt;br /&gt;
	Operator &amp;quot;[]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[];&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the []! operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[]!&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;amp;$this-&amp;gt;$Values[]!;&lt;br /&gt;
	}&lt;br /&gt;
	// Overload the [&amp;lt;&amp;gt;] operator&lt;br /&gt;
	// Same as above nothing special here&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return VarDump($Values);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
*$Testy[] = &amp;quot;One&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Two&amp;quot;;&lt;br /&gt;
*$Testy[] = &amp;quot;Three&amp;quot;;&lt;br /&gt;
*$Testy[]! = &amp;quot;Zero&amp;quot;;&lt;br /&gt;
println( *$Testy[&amp;lt;&amp;gt;] );&lt;br /&gt;
Unset($Testy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Overloading [&amp;lt;=&amp;gt;] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
Class Testy&lt;br /&gt;
{&lt;br /&gt;
	Operator &amp;quot;[&amp;lt;=&amp;gt;]&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		return array(&amp;quot;key&amp;quot; =&amp;gt; &amp;quot;value&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
my $Testy = new Testy();&lt;br /&gt;
printr $Testy[&amp;lt;=&amp;gt;];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Classes]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>