<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://sigwiki.potato.tf/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mince</id>
	<title>SigMod - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://sigwiki.potato.tf/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mince"/>
	<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php/Special:Contributions/Mince"/>
	<updated>2026-06-04T19:14:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7534</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7534"/>
		<updated>2024-01-22T21:29:59Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is made up of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Squirrel stores data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can think of statements as analogous to sentences in the language we speak to each other; each requires a specific set of items in a certain order to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, whereas statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7533</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7533"/>
		<updated>2024-01-22T21:29:16Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is made up of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Squirrel stores data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can think of statements as analogous to sentences in the language we speak to each other; each requires a specific set of items in a specific order to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7532</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7532"/>
		<updated>2024-01-22T21:28:32Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is made up of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Squirrel stores data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can think of statements as analogous to sentences in the language we speak to each other; each requires a specific set of items to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7531</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7531"/>
		<updated>2024-01-22T21:28:06Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is made up of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Squirrel stores data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can think of statements as analogous to sentences in the language we speak to each other, each requires a specific set of items to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7530</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7530"/>
		<updated>2024-01-22T21:28:00Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is made up of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Squirrel stores data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;.&lt;br /&gt;
You can think of statements as analogous to sentences in the language we speak to each other, each requires a specific set of items to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7529</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7529"/>
		<updated>2024-01-22T21:27:27Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is made up of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Squirrel stores data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;. You can think of statements as analogous to sentences in the language we speak to each other, each requires a specific set of items to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7528</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7528"/>
		<updated>2024-01-22T21:26:11Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is made up of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Programs store data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;. You can think of statements as analogous to sentences in the language we speak to each other, each requires a specific set of items to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7527</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7527"/>
		<updated>2024-01-22T21:25:40Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;lt;code&amp;gt;&amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;bind 5 &amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;printl&#039;&#039;&#039;&amp;lt;/code&amp;gt; is a function that prints to the developer console, we&#039;ll go over what functions are and the syntax for it later in the guide, for now just follow along. After saving the file and pressing our script button in-game, you&#039;ll see &amp;lt;code&amp;gt;Hello World!&amp;lt;/code&amp;gt; in console.&lt;br /&gt;
&lt;br /&gt;
You just made your first program in VScript! To get started with the guide, choose a chapter in the table below. Make sure to tinker with the examples in the guide to see first hand how Squirrel works!&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7526</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7526"/>
		<updated>2024-01-22T21:25:13Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;lt;code&amp;gt;&amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;bind 5 &amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;printl&#039;&#039;&#039;&amp;lt;/code&amp;gt; is a function that prints to the developer console, we&#039;ll go over what functions are and the syntax for it later in the guide, for now just follow along. After saving the file and pressing our script button in-game, you&#039;ll see &amp;lt;code&amp;gt;Hello World!&amp;lt;/code&amp;gt; in console. You just made your first program in VScript! To get started with the guide, choose a chapter in the table below. Make sure to tinker with the examples in the guide to see first hand how Squirrel works!&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Installing_on_Windows_with_WSL&amp;diff=7524</id>
		<title>Installing on Windows with WSL</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Installing_on_Windows_with_WSL&amp;diff=7524"/>
		<updated>2023-12-11T17:57:13Z</updated>

		<summary type="html">&lt;p&gt;Mince: C/P correct libraries from tfwiki https://wiki.teamfortress.com/wiki/Linux_dedicated_server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Easy installation script ==&lt;br /&gt;
Right click this link and select save link as:&lt;br /&gt;
&lt;br /&gt;
https://raw.githubusercontent.com/rafradek/sigsegv-mvm/master/windows_install_wsl.bat&lt;br /&gt;
&lt;br /&gt;
Run the downloaded bat file and follow the instructions printed in console&lt;br /&gt;
&lt;br /&gt;
== Manual installation ==&lt;br /&gt;
Run the bat file and follow instructions printed in console&lt;br /&gt;
&lt;br /&gt;
Based on guides: https://docs.microsoft.com/en-us/windows/wsl/install-win10 https://wiki.teamfortress.com/wiki/Linux_dedicated_server&lt;br /&gt;
&lt;br /&gt;
Open PowerShell as administrator, then execute those commands&lt;br /&gt;
 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart&lt;br /&gt;
 dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart&lt;br /&gt;
&lt;br /&gt;
Now restart your PC. After that, execute another PowerShell command&lt;br /&gt;
 wsl --set-default-version  2&lt;br /&gt;
 echo [wsl2] memory=2GB &amp;gt; $env:USERPROFILE/.wslconfig&lt;br /&gt;
Open Microsoft Store and install Ubuntu. Launch Ubuntu from start menu. Fill in username and password info when asked. Install required packages by entering those commands into the window:&lt;br /&gt;
 sudo dpkg --add-architecture i386&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc-s1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386&lt;br /&gt;
 sudo ufw disable&lt;br /&gt;
Those Ubuntu commands will install and update server in ~/hlserver/hlserver:&lt;br /&gt;
 mkdir ~/hlserver&lt;br /&gt;
 cd ./hlserver&lt;br /&gt;
 wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz&lt;br /&gt;
 tar zxf steamcmd_linux.tar.gz&lt;br /&gt;
 ./steamcmd.sh +login anonymous +force_install_dir ./hlserver +app_update 232250 +quit&lt;br /&gt;
You can browse server files in windows explorer with this Ubuntu command:&lt;br /&gt;
 explorer.exe ~/hlserver/hlserver&lt;br /&gt;
If you have an existing windows server installation you can copy server files here.&lt;br /&gt;
&lt;br /&gt;
Install a linux version of sourcemod and mm: source in this location&lt;br /&gt;
&lt;br /&gt;
Unpack all sigsegv archive contents into tf directory&lt;br /&gt;
&lt;br /&gt;
Create a server starting file with Ubuntu commands:&lt;br /&gt;
 echo &amp;quot;#!/bin/sh&amp;quot; &amp;gt; ~/startserver.sh&lt;br /&gt;
 echo &amp;quot;~/hlserver/hlserver/srcds_run +map bigrock +maxplayers 32&amp;quot; &amp;gt;&amp;gt; ~/startserver.sh&lt;br /&gt;
 chmod u+x ~/startserver.sh&lt;br /&gt;
Run server with Ubuntu command:&lt;br /&gt;
 ~/startserver.sh&lt;br /&gt;
Or, to run a server from windows CMD / PowerShell:&lt;br /&gt;
 wsl ~/startserver.sh&lt;br /&gt;
You should check your linux server IP with a command executed in PowerShell. You can use this IP to connect to your server from this Windows PC. IP will change with every system reset:&lt;br /&gt;
 wsl hostname -I&lt;br /&gt;
The section below tells how to connect to the server using your LAN or public IP if available&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can make the server autostart by adding a scheduled task in Task Scheduler, on login condition, running wsl as a program with ~/startserver.sh as an argument.&lt;br /&gt;
&lt;br /&gt;
=Make the server accessible from the Internet and the local network=&lt;br /&gt;
Download a program named [http://aluigi.altervista.org/mytoolz/sudppipe.zip sudppipe] (The browser may mark this file as unsafe so you might have to right click and select Save link As)&lt;br /&gt;
&lt;br /&gt;
Unpack the downloaded archive, then create tf2portpipe.bat file in the unpacked directory alongside sudppipe.exe. Replace port value with your own server port. The port should not be in use by any other program (TF2 client often binds to port 27015).&lt;br /&gt;
 @ECHO off&lt;br /&gt;
 &lt;br /&gt;
 SET port=27015&lt;br /&gt;
 &lt;br /&gt;
 FOR /F &amp;quot;tokens=* USEBACKQ&amp;quot; %%F IN (`wsl hostname -I`) DO (&lt;br /&gt;
 SET ip=%%F&lt;br /&gt;
 )&lt;br /&gt;
 %~dp0/sudppipe.exe -q -b 0.0.0.0 %ip% %port% %port%&lt;br /&gt;
Run the bat file. If you wish to get rid of the console window, add a run on system startup scheduled task, with run whether user is logged on or not option, launching this script file as a program.&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Expressions&amp;diff=7501</id>
		<title>Squirrel Expressions</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Expressions&amp;diff=7501"/>
		<updated>2023-10-31T23:35:28Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Operators BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expressions are combinations of literals, variables, and operators which are evaluated to return a single value, which can then be used in variable assignment or other tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(1 + 2 + 3); // 1 + 2 + 3 is an expression which evaluates to the integer 6, 6 is then printed to the console&lt;br /&gt;
&lt;br /&gt;
local x = 500.0 / 2; // 500 / 2 is an expression which evaluates to 250.0, 250.0 is then assigned to x&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With all the working parts, especially the operators, you might wonder how the compiler knows what order to parse your code in, or what order of operations to adhere to. This is called operator precedence, which determines what operators are called first over others in the same expression. You can view the [http://squirrel-lang.org/squirreldoc/reference/language/expressions.html?highlight=bitwise#operators-precedence Squirrel Precedence List] in the Squirrel Reference Manual. Keep in mind you should use this as a &#039;&#039;reference&#039;&#039;, don&#039;t try to memorize the whole list, it&#039;s not necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Concerning precedence, there a few things that are worth remembering however, The most important is that parentheses have the highest operator precedence. If you&#039;re not sure of a particular operator precedence issue you can enforce your own order of operations with parentheses and get along just fine. Another important one is the precedence of logical NOT AND &amp;amp; OR between themselves, these are frequently used in programs together, so it&#039;s useful to remember the precedence order. NOT has the highest, then AND, and the lowest is OR. NOT AND OR. The same applies to the bitwise NOT AND OR/XOR. One last precedence issue that might pop up semi-frequently is that bitwise AND has a lower precedence than the relational operators (namely the inequality operator). This is relevant for the example in the previous chapter of testing for the existence of bit flags. (Note the parentheses present in that example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;beevus&amp;quot; || !true &amp;amp;&amp;amp; &amp;quot;butthead&amp;quot;); // &amp;quot;beevus&amp;quot;&lt;br /&gt;
// !true is evaluated first, NOT has the highest precedence, it becomes false&lt;br /&gt;
// next is false &amp;amp;&amp;amp; &amp;quot;butthead&amp;quot;, which becomes false&lt;br /&gt;
// next is &amp;quot;beevus&amp;quot; || false, which finally evaluates to &amp;quot;beevus&amp;quot;, which is then printed to console&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7500</id>
		<title>Squirrel Operators</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7500"/>
		<updated>2023-10-31T23:00:52Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Expressions NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you know how to create data and store it into variables, we can now go over how to modify and operate on that data. Operators are used for this purpose, they take one or more operands and produce a result value. Operators which take one operand are called unary operators, two operands are binary operators, and three are ternary operators.&lt;br /&gt;
This section is quite long so don&#039;t worry about memorizing every single operator, just browse through and become familiar with the various types of operators and their uses, you&#039;ll have plenty of examples throughout the rest of the guide to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Arithmetic&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The arithmetic operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039;&amp;lt;/code&amp;gt; are used for, well, arithmetic! Technically we can use them on certain object types (more on in future sections), however by default they&#039;re for use with the integer, float, and (partially) string types. You should be familiar with most of these already.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unary minus&lt;br /&gt;
| -&lt;br /&gt;
| -x&lt;br /&gt;
|Negation of x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 50;&lt;br /&gt;
x = -x; // -50&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Binary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition&lt;br /&gt;
| +&lt;br /&gt;
| x + y&lt;br /&gt;
|x plus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction&lt;br /&gt;
| -&lt;br /&gt;
| x - y&lt;br /&gt;
|x minus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication&lt;br /&gt;
| *&lt;br /&gt;
| x * y&lt;br /&gt;
|x multiplied by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division&lt;br /&gt;
| /&lt;br /&gt;
| x / y&lt;br /&gt;
|x divided by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder&lt;br /&gt;
| %&lt;br /&gt;
| x % y&lt;br /&gt;
|the remainder from: x divided by y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 100 + 100; // 200&lt;br /&gt;
local w = 0 - 2;     // -2&lt;br /&gt;
local x = 5.5 * 100; // 550.0&lt;br /&gt;
local y = 20 / 2;    // 10&lt;br /&gt;
local z = 23 % 2;    // 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The addition operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;+=&#039;&#039;&#039;&amp;lt;/code&amp;gt; are the only operators able to handle string operands. If one operand is a string, Squirrel will try to convert the other operand to a string as well.&lt;br /&gt;
This same type conversion happens between floats and integers for any arithmetic operator (not just addition). If one operand is a float and the other an integer, the resulting value will be a float.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local str1 = &amp;quot;Hello,&amp;quot;;&lt;br /&gt;
local str2 = &amp;quot; World!&amp;quot;;&lt;br /&gt;
str1 += str2; // Hello World!&lt;br /&gt;
// See next section for +=&lt;br /&gt;
&lt;br /&gt;
local float = 10 - 7.0 // 3.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Assignment&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment operator (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) is used for assigning values to variables. It can be combined with the arithmetic operators to create arithmetic assignment operators (e.g. &amp;lt;code&amp;gt;&#039;&#039;&#039;x += 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;), which is a shortened version of: &amp;lt;code&amp;gt;&#039;&#039;&#039;x = x + 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Assignment&lt;br /&gt;
| =&lt;br /&gt;
| x = y&lt;br /&gt;
|assign value y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition Assignment&lt;br /&gt;
| +=&lt;br /&gt;
| x += y&lt;br /&gt;
|assign x + y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction Assignment&lt;br /&gt;
| -=&lt;br /&gt;
| x -= y&lt;br /&gt;
|assign x - y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication Assignment&lt;br /&gt;
| *=&lt;br /&gt;
| x *= y&lt;br /&gt;
|assign x * y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division Assignment&lt;br /&gt;
| /=&lt;br /&gt;
| x /= y&lt;br /&gt;
|assign x / y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder Assignment&lt;br /&gt;
| %=&lt;br /&gt;
| x %= y&lt;br /&gt;
|assign x % y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 100;&lt;br /&gt;
x += 5;   // equivalent to: x = x + 5&lt;br /&gt;
x -= 5;   // 100&lt;br /&gt;
x *= 100; // 10,000&lt;br /&gt;
x /= 2;   // 5,000&lt;br /&gt;
x %= 2;   // 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Increment/Decrement&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The increment and decrement operators are used (respectively) to increase or decrease a variable by 1. This can be done &#039;&#039;&#039;before&#039;&#039;&#039; the variable is returned in the case of the prefixed operators, or it can be done &#039;&#039;&#039;after&#039;&#039;&#039; the variable has been returned in the case of the postfixed operators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-increment&lt;br /&gt;
| ++&lt;br /&gt;
| ++x&lt;br /&gt;
|increment x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-increment&lt;br /&gt;
| ++&lt;br /&gt;
| x++&lt;br /&gt;
|copy x, increment variable x by 1, then return the copy&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-decrement&lt;br /&gt;
| --&lt;br /&gt;
| --x&lt;br /&gt;
|decrement x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-decrement&lt;br /&gt;
| --&lt;br /&gt;
| x--&lt;br /&gt;
|copy x, decrement variable x by 1, then return the copy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 1;&lt;br /&gt;
local y;&lt;br /&gt;
&lt;br /&gt;
y = x++; // y = 1, it got the value of x and then x got incremented, x = 2&lt;br /&gt;
y = ++x; // y = 3, x got incremented and then y got x&#039;s value, x = 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Relational&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The relational operators compare the values of their operands and return a boolean based on their result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Equality&lt;br /&gt;
| ==&lt;br /&gt;
| x == y&lt;br /&gt;
|true if x equals y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Inequality&lt;br /&gt;
| !=&lt;br /&gt;
| x != y&lt;br /&gt;
|true if x does not equal y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than&lt;br /&gt;
| &amp;lt;&lt;br /&gt;
| x &amp;lt; y&lt;br /&gt;
|true if x is less than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than&lt;br /&gt;
| &amp;gt;&lt;br /&gt;
| x &amp;gt; y&lt;br /&gt;
|true if x is greater than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than or equal to&lt;br /&gt;
| &amp;lt;=&lt;br /&gt;
| x &amp;lt;= y&lt;br /&gt;
|true if x is less than or equal to y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than or equal to&lt;br /&gt;
| &amp;gt;=&lt;br /&gt;
| x &amp;gt;= y&lt;br /&gt;
|true if x is greater than or equal to y, false otherwise&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 5;&lt;br /&gt;
local y = 5;&lt;br /&gt;
local z;&lt;br /&gt;
&lt;br /&gt;
z = x == y; // true&lt;br /&gt;
z = x != y; // false&lt;br /&gt;
z = x &amp;gt; y;  // false&lt;br /&gt;
z = x &amp;gt;= y; // true&lt;br /&gt;
z = x &amp;lt; y;  // false&lt;br /&gt;
z = x &amp;lt;= y; // true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Logical&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The logical operators are primarily used in control flow to create condition based code. We&#039;ll go over control flow in a future section, for now just know that they exist and that you can reference back here if you forget what one does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical NOT&lt;br /&gt;
| !&lt;br /&gt;
| !x&lt;br /&gt;
|true if x evaluates to false, otherwise true&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical AND&lt;br /&gt;
| &amp;amp;&amp;amp;&lt;br /&gt;
| x &amp;amp;&amp;amp; y&lt;br /&gt;
|true if both operands evaluate to true, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|true if either operand evaluates to true, otherwise false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For most purposes the above definitions for AND &amp;amp; OR are sufficient, however Squirrel does not simply return boolean true or false for these operators, rather it returns a specific operand passed to the operator based on the result.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Logical AND will return the *first* operand that evaluates to *false*, if none do, it will return the *last* operand.&lt;br /&gt;
&lt;br /&gt;
Logical OR will return the *first* operand that evaluates to *true*, if none do, it will return the *last* operand.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A common use case of this functionality with the logical OR operator is to fill a variable with the first value that evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local var = othervar || otherothervar || 1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some cases we may have access to variables that we don&#039;t know the value of, they could be null for all we know! This is a good way of providing &amp;quot;backup&amp;quot; values to use in our program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certain values evaluate to false, these are: &amp;lt;code&amp;gt;&#039;&#039;&#039;false, null, 0, 0.0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Everything else evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 0 &amp;amp;&amp;amp; 1;         // 0&lt;br /&gt;
local w = null || &amp;quot;bark&amp;quot;; // &amp;quot;bark&amp;quot;&lt;br /&gt;
local x = &amp;quot;&amp;quot; || true;     // &amp;quot;&amp;quot;&lt;br /&gt;
local y = !0;             // true&lt;br /&gt;
local z = 5 &amp;amp;&amp;amp; &amp;quot;0&amp;quot;        // &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bitwise&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All data in computer memory is stored as sequences of bits; 0&#039;s and 1&#039;s. The bitwise operators work directly with those bits for integer values in Squirrel. As a beginner you aren&#039;t likely to use these operators unless you have a very specific reason to. We won&#039;t go over what each of these does under the hood as it&#039;s a bit out of scope for this language introduction, however if you want to learn more about bits and the bitwise operators, [https://www.learncpp.com/cpp-tutorial/bitwise-operators/ learncpp.com] goes over them quite nicely. (Just ignore the C++ specific stuff.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise NOT&lt;br /&gt;
| ~&lt;br /&gt;
| ~x&lt;br /&gt;
|Flips all bits in x; 1 becomes 0 and 0 becomes 1&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise AND&lt;br /&gt;
| &amp;amp;&lt;br /&gt;
| x &amp;amp; y&lt;br /&gt;
|Each bit in x AND each bit in y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|Each bit in x OR each bit in y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise XOR&lt;br /&gt;
| ^&lt;br /&gt;
| x ^ y&lt;br /&gt;
|Each bit in x Exclusive OR each bit in y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Left shift&lt;br /&gt;
| &amp;lt;&amp;lt;&lt;br /&gt;
| x &amp;lt;&amp;lt; y&lt;br /&gt;
|Shift all bits in x left by integer y spaces&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Right shift&lt;br /&gt;
| &amp;gt;&amp;gt;&lt;br /&gt;
| x &amp;gt;&amp;gt; y&lt;br /&gt;
|Shift all bits in x right by integer y spaces&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unsigned right shift&lt;br /&gt;
| &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
| x &amp;gt;&amp;gt;&amp;gt; y&lt;br /&gt;
|Same as normal right shift (&amp;gt;&amp;gt;) but treat x as unsigned (only positive values, no negative ones)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For day to day use, you&#039;re mostly going to be using bitwise AND along with bitwise OR to manipulate &#039;&#039;&#039;bit flags&#039;&#039;&#039;, which are variables where each of the 32 bits (or however big the variable is) represents a boolean flag. So instead of having 32 different boolean variables, you can have 1 variable that represents 32 booleans!&lt;br /&gt;
&lt;br /&gt;
The m_fFlags datamap of [[CBaseEntity]] in the Source Engine is a real example of this, each of the 32 bits of the integer can represent a flag. Defined in the source code are macros which contain the values for these bits, as you can see below the left shift operator is used to shift the bits (more accurately the only bit) of integer 1 left by an increasing amount of places.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
#define	FL_ONGROUND				(1&amp;lt;&amp;lt;0)	// At rest / on the ground&lt;br /&gt;
#define FL_DUCKING				(1&amp;lt;&amp;lt;1)	// Player flag -- Player is fully crouched&lt;br /&gt;
#define FL_ANIMDUCKING			(1&amp;lt;&amp;lt;2)	// Player flag -- Player is in the process of crouching or uncrouching but could be in transition&lt;br /&gt;
#define	FL_WATERJUMP			(1&amp;lt;&amp;lt;3)	// player jumping out of water&lt;br /&gt;
#define FL_ONTRAIN				(1&amp;lt;&amp;lt;4)  // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
#define FL_UNBLOCKABLE_BY_PLAYER (1&amp;lt;&amp;lt;31) // pusher that can&#039;t be blocked by the player&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The middle part has been omitted for brevity, the first five macros are equivalent to the integer values: &amp;lt;code&amp;gt;&#039;&#039;&#039;1, 2, 4, 8, and 16&#039;&#039;&#039;&amp;lt;/code&amp;gt; and the last is &amp;lt;code&amp;gt;&#039;&#039;&#039;2147483648&#039;&#039;&#039;&amp;lt;/code&amp;gt;. In VScript, these have been defined in the [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants#FPlayer FPlayer] enum and can be used in your programs when necessary, however the way to manipulate bit flags is a bit different than regular integers, you can&#039;t just try to add them together with the addition operator!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To add bit flags together, use the bitwise OR (&amp;lt;code&amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// In real code, you would need to prefix these with &amp;quot;Constants.FPlayer.&amp;quot; (e.g. Constants.FPlayer.FL_ONGROUND), this is just a brief demonstration&lt;br /&gt;
&lt;br /&gt;
local mybitflags = FL_ONGROUND | FL_DUCKING | FL_ANIMDUCKING; // 7  (1 + 2 + 4)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a flag, use the bitwise AND (&amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;amp;&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator along with the bitwise NOT (&amp;lt;code&amp;gt;&#039;&#039;&#039;~&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator on the flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// In real code, you would need to prefix these with &amp;quot;Constants.FPlayer.&amp;quot; (e.g. Constants.FPlayer.FL_ONGROUND), this is just a brief demonstration&lt;br /&gt;
&lt;br /&gt;
local mybitflags = FL_ONGROUND | FL_DUCKING | FL_ANIMDUCKING; // 7  (1 + 2 + 4)&lt;br /&gt;
&lt;br /&gt;
printl(mybitflags &amp;amp; ~FL_ONGROUND); // 6&lt;br /&gt;
printl( mybitflags &amp;amp; ~(FL_ONGROUND | FL_ANIMDUCKING) ); // 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test if a flag is present, use the bitwise AND (&amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;amp;&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator and compare the result against 0 using the inequality operator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// In real code, you would need to prefix these with &amp;quot;Constants.FPlayer.&amp;quot; (e.g. Constants.FPlayer.FL_ONGROUND), this is just a brief demonstration&lt;br /&gt;
&lt;br /&gt;
local mybitflags = FL_ONGROUND | FL_DUCKING | FL_ANIMDUCKING;&lt;br /&gt;
local testflags  = FL_ONGROUND | FL_DUCKING;&lt;br /&gt;
&lt;br /&gt;
printl( (mybitflags &amp;amp; testflags) != 0 )  // true&lt;br /&gt;
printl( (mybitflags &amp;amp; FL_ONTRAIN) != 0 ) // false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7499</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7499"/>
		<updated>2023-10-31T22:37:05Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is comprised of a set of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Programs store data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;. You can think of statements as analogous to sentences in the language we speak to each other, each requires a specific set of items to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Normal variables like the ones we defined above can be changed at any time, however what if we have a variable that we don&#039;t want to change or that wouldn&#039;t make any sense to change? This is where constants come in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
const DAYS_IN_WEEK = 7;&lt;br /&gt;
const PI = 3.1415926535;&lt;br /&gt;
const NAME = &amp;quot;Dell Conagher&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constants are variables which cannot be changed after they are created, however they can only contain certain values. Constants may only be created with integer, float, or string &#039;&#039;&#039;literals&#039;&#039;&#039;. We go over what these are in depth in the [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types] chapter. For now if you&#039;d like a reference of what those are, the variables in the above example contain the specified types. &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt; is an &#039;&#039;&#039;integer&#039;&#039;&#039;, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;float&#039;&#039;&#039;, and &amp;lt;code&amp;gt;&amp;quot;Dell Conagher&amp;quot;&amp;lt;/code&amp;gt; is a &#039;&#039;&#039;string&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7498</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7498"/>
		<updated>2023-10-31T22:19:32Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;lt;code&amp;gt;&amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;bind 5 &amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;printl&#039;&#039;&#039;&amp;lt;/code&amp;gt; is a function that prints to the developer console, we&#039;ll go over what functions are and the syntax for it later in the guide, for now just follow along. After saving the file and pressing our script button in-game, you&#039;ll see &amp;lt;code&amp;gt;Hello World!&amp;lt;/code&amp;gt; in console. That&#039;s all to get started! Get started with the guide by choosing a chapter in the table below. Make sure to tinker with the examples in the guide to see first hand how Squirrel works!&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7497</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7497"/>
		<updated>2023-10-31T22:19:13Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;lt;code&amp;gt;&amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;bind 5 &amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;printl&#039;&#039;&#039;&amp;lt;/code&amp;gt; is a function that prints to the developer console, we&#039;ll go over what functions are and the syntax for it later in the guide, for now just follow along. After saving the file and pressing our script button in-game, you&#039;ll see &amp;lt;code&amp;gt;Hello World!&amp;lt;/code&amp;gt; in console. That&#039;s all to get started! Get started with the guide by choosing a chapter in the table below. Make sure to tinker with the examples to see first hand how Squirrel works!&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7496</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7496"/>
		<updated>2023-10-31T22:17:39Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;lt;code&amp;gt;&amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;bind 5 &amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;printl&#039;&#039;&#039;&amp;lt;/code&amp;gt; is a function that prints to the developer console, we&#039;ll go over what functions are and the syntax for it later in the guide, for now just follow along. After saving the file and pressing our script button in-game, you&#039;ll see &amp;lt;code&amp;gt;Hello World!&amp;lt;/code&amp;gt; in console. That&#039;s all to get started! Follow along through the guide and tinker with the examples to see first hand how Squirrel works, good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7495</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7495"/>
		<updated>2023-10-31T22:16:25Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;lt;code&amp;gt;&amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;bind 5 &amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the file and pressing our script button in-game, you&#039;ll see &amp;lt;code&amp;gt;Hello World!&amp;lt;/code&amp;gt; in console. That&#039;s all to get started! Follow along through the guide and tinker with the examples to see first hand how Squirrel works, good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7494</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7494"/>
		<updated>2023-10-31T22:15:52Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;lt;code&amp;gt;&amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;bind 5 &amp;quot;script_execute testing&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the file and pressing our script button in-game, you&#039;ll see &amp;lt;code&amp;gt;Hello World!&amp;lt;/code&amp;gt; in console. That&#039;s all to get started! Follow along through the guide and tinker with your own little programs to see first hand how Squirrel works, good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7493</id>
		<title>An Introduction to Squirrel</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel&amp;diff=7493"/>
		<updated>2023-10-31T22:12:37Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Overview] ==&lt;br /&gt;
This is a relatively brief beginner&#039;s guide to the Squirrel language (v3.2) aimed at people with little to no programming experience. While this guide is intended to be used by people wanting to learn VScript for TF2, it doesn&#039;t cover anything regarding how to use VScript itself.&lt;br /&gt;
&lt;br /&gt;
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedient learning experience aimed at developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [https://sigwiki.potato.tf/index.php?title=An_Introduction_to_Squirrel Getting Started] ==&lt;br /&gt;
While it&#039;s possible to compile the Squirrel source code into binaries with which you can test your code outside of a Source game, simply launching a game and executing your script is much simpler and allows you to start tinkering with Squirrel quicker, so that&#039;s what we&#039;ll do for the duration of the guide. For guides on VScript itself, the VDC has an excellent collection:&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/VScript_Fundamentals VScript Fundamentals]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Entity_Scripts Entity Scripts]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions Script Functions]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants Constants]&lt;br /&gt;
* [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/VScript_Examples/en VScript Examples]&lt;br /&gt;
&lt;br /&gt;
To get set up, navigate to your tf/ directory and add a scripts/vscripts folder if it doesn&#039;t already exist and create a file with any name with the extension .nut. (Mine will be named testing.nut)&lt;br /&gt;
&lt;br /&gt;
You should have a location something like this: &amp;lt;pre&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\vscripts\testing.nut&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go ahead and launch your favorite Source game which supports VScript and load into any map on a local server, then bind any key to &amp;quot;script_execute testing&amp;quot;.&lt;br /&gt;
For example: bind 5 &amp;quot;script_execute testing&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Tab out of your game, open your .nut file and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
printl(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prints the text &amp;quot;Hello World!&amp;quot; to console, we&#039;ll cover what all this means later, for now this is just to make sure you have a set up to test with as you read through the guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 25px; background-color: #303030; color: white; border: 2px solid black&amp;quot; | Chapters&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Variables Variables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Comments Comments]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Data_Types Data Types]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Operators Operators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Expressions Expressions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions Intro to Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects Into to Objects]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Scopes Scopes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow Control Flow]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Exceptions Exceptions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Enums Enums]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Arrays Arrays]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Tables Tables]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Functions Functions]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Generators Generators]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Delegation Delegation]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Weak_References Weak References]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Classes Classes]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Inheritance Inheritance]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; style=&amp;quot;padding: 0; margin: 0; width: 100%;&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 0 auto; width: 100%; padding: 0; border: none;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; style=&amp;quot;border: 1px solid black; padding-right:64px; background-color: #606060; color: #111111; height: 35px;&amp;quot; | [https://sigwiki.potato.tf/index.php/Squirrel_Metamethods Metamethods]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7492</id>
		<title>Squirrel Operators</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7492"/>
		<updated>2023-10-31T22:08:41Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Expressions NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you know how to create data and store it into variables, we can now go over how to modify and operate on that data. Operators are used for this purpose, they take one or more operands and produce a result value. Operators which take one operand are called unary operators, two operands are binary operators, and three are ternary operators.&lt;br /&gt;
This section is quite long so don&#039;t worry about memorizing every single operator, just browse through and become familiar with the various types of operators and their uses, you&#039;ll have plenty of examples throughout the rest of the guide to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Arithmetic&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The arithmetic operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039;&amp;lt;/code&amp;gt; are used for, well, arithmetic! Technically we can use them on certain object types (more on in future sections), however by default they&#039;re for use with the integer, float, and (partially) string types. You should be familiar with most of these already.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unary minus&lt;br /&gt;
| -&lt;br /&gt;
| -x&lt;br /&gt;
|Negation of x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 50;&lt;br /&gt;
x = -x; // -50&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Binary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition&lt;br /&gt;
| +&lt;br /&gt;
| x + y&lt;br /&gt;
|x plus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction&lt;br /&gt;
| -&lt;br /&gt;
| x - y&lt;br /&gt;
|x minus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication&lt;br /&gt;
| *&lt;br /&gt;
| x * y&lt;br /&gt;
|x multiplied by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division&lt;br /&gt;
| /&lt;br /&gt;
| x / y&lt;br /&gt;
|x divided by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder&lt;br /&gt;
| %&lt;br /&gt;
| x % y&lt;br /&gt;
|the remainder from: x divided by y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 100 + 100; // 200&lt;br /&gt;
local w = 0 - 2;     // -2&lt;br /&gt;
local x = 5.5 * 100; // 550.0&lt;br /&gt;
local y = 20 / 2;    // 10&lt;br /&gt;
local z = 23 % 2;    // 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The addition operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;+=&#039;&#039;&#039;&amp;lt;/code&amp;gt; are the only operators able to handle string operands. If one operand is a string, Squirrel will try to convert the other operand to a string as well.&lt;br /&gt;
This same type conversion happens between floats and integers for any arithmetic operator (not just addition). If one operand is a float and the other an integer, the resulting value will be a float.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local str1 = &amp;quot;Hello,&amp;quot;;&lt;br /&gt;
local str2 = &amp;quot; World!&amp;quot;;&lt;br /&gt;
str1 += str2; // Hello World!&lt;br /&gt;
// See next section for +=&lt;br /&gt;
&lt;br /&gt;
local float = 10 - 7.0 // 3.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Assignment&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment operator (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) is used for assigning values to variables. It can be combined with the arithmetic operators to create arithmetic assignment operators (e.g. &amp;lt;code&amp;gt;&#039;&#039;&#039;x += 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;), which is a shortened version of: &amp;lt;code&amp;gt;&#039;&#039;&#039;x = x + 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Assignment&lt;br /&gt;
| =&lt;br /&gt;
| x = y&lt;br /&gt;
|assign value y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition Assignment&lt;br /&gt;
| +=&lt;br /&gt;
| x += y&lt;br /&gt;
|assign x + y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction Assignment&lt;br /&gt;
| -=&lt;br /&gt;
| x -= y&lt;br /&gt;
|assign x - y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication Assignment&lt;br /&gt;
| *=&lt;br /&gt;
| x *= y&lt;br /&gt;
|assign x * y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division Assignment&lt;br /&gt;
| /=&lt;br /&gt;
| x /= y&lt;br /&gt;
|assign x / y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder Assignment&lt;br /&gt;
| %=&lt;br /&gt;
| x %= y&lt;br /&gt;
|assign x % y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 100;&lt;br /&gt;
x += 5;   // equivalent to: x = x + 5&lt;br /&gt;
x -= 5;   // 100&lt;br /&gt;
x *= 100; // 10,000&lt;br /&gt;
x /= 2;   // 5,000&lt;br /&gt;
x %= 2;   // 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Increment/Decrement&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The increment and decrement operators are used (respectively) to increase or decrease a variable by 1. This can be done &#039;&#039;&#039;before&#039;&#039;&#039; the variable is returned in the case of the prefixed operators, or it can be done &#039;&#039;&#039;after&#039;&#039;&#039; the variable has been returned in the case of the postfixed operators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-increment&lt;br /&gt;
| ++&lt;br /&gt;
| ++x&lt;br /&gt;
|increment x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-increment&lt;br /&gt;
| ++&lt;br /&gt;
| x++&lt;br /&gt;
|copy x, increment variable x by 1, then return the copy&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-decrement&lt;br /&gt;
| --&lt;br /&gt;
| --x&lt;br /&gt;
|decrement x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-decrement&lt;br /&gt;
| --&lt;br /&gt;
| x--&lt;br /&gt;
|copy x, decrement variable x by 1, then return the copy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 1;&lt;br /&gt;
local y;&lt;br /&gt;
&lt;br /&gt;
y = x++; // y = 1, it got the value of x and then x got incremented, x = 2&lt;br /&gt;
y = ++x; // y = 3, x got incremented and then y got x&#039;s value, x = 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Relational&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The relational operators compare the values of their operands and return a boolean based on their result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Equality&lt;br /&gt;
| ==&lt;br /&gt;
| x == y&lt;br /&gt;
|true if x equals y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Inequality&lt;br /&gt;
| !=&lt;br /&gt;
| x != y&lt;br /&gt;
|true if x does not equal y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than&lt;br /&gt;
| &amp;lt;&lt;br /&gt;
| x &amp;lt; y&lt;br /&gt;
|true if x is less than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than&lt;br /&gt;
| &amp;gt;&lt;br /&gt;
| x &amp;gt; y&lt;br /&gt;
|true if x is greater than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than or equal to&lt;br /&gt;
| &amp;lt;=&lt;br /&gt;
| x &amp;lt;= y&lt;br /&gt;
|true if x is less than or equal to y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than or equal to&lt;br /&gt;
| &amp;gt;=&lt;br /&gt;
| x &amp;gt;= y&lt;br /&gt;
|true if x is greater than or equal to y, false otherwise&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 5;&lt;br /&gt;
local y = 5;&lt;br /&gt;
local z;&lt;br /&gt;
&lt;br /&gt;
z = x == y; // true&lt;br /&gt;
z = x != y; // false&lt;br /&gt;
z = x &amp;gt; y;  // false&lt;br /&gt;
z = x &amp;gt;= y; // true&lt;br /&gt;
z = x &amp;lt; y;  // false&lt;br /&gt;
z = x &amp;lt;= y; // true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Logical&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The logical operators are primarily used in control flow to create condition based code. We&#039;ll go over control flow in a future section, for now just know that they exist and that you can reference back here if you forget what one does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical NOT&lt;br /&gt;
| !&lt;br /&gt;
| !x&lt;br /&gt;
|true if x evaluates to false, otherwise true&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical AND&lt;br /&gt;
| &amp;amp;&amp;amp;&lt;br /&gt;
| x &amp;amp;&amp;amp; y&lt;br /&gt;
|true if both operands evaluate to true, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|true if either operand evaluates to true, otherwise false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For most purposes the above definitions for AND &amp;amp; OR are sufficient, however Squirrel does not simply return boolean true or false for these operators, rather it returns a specific operand passed to the operator based on the result.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Logical AND will return the *first* operand that evaluates to *false*, if none do, it will return the *last* operand.&lt;br /&gt;
&lt;br /&gt;
Logical OR will return the *first* operand that evaluates to *true*, if none do, it will return the *last* operand.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A common use case of this functionality with the logical OR operator is to fill a variable with the first value that evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local var = othervar || otherothervar || 1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some cases we may have access to variables that we don&#039;t know the value of, they could be null for all we know! This is a good way of providing &amp;quot;backup&amp;quot; values to use in our program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certain values evaluate to false, these are: &amp;lt;code&amp;gt;&#039;&#039;&#039;false, null, 0, 0.0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Everything else evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 0 &amp;amp;&amp;amp; 1;         // 0&lt;br /&gt;
local w = null || &amp;quot;bark&amp;quot;; // &amp;quot;bark&amp;quot;&lt;br /&gt;
local x = &amp;quot;&amp;quot; || true;     // &amp;quot;&amp;quot;&lt;br /&gt;
local y = !0;             // true&lt;br /&gt;
local z = 5 &amp;amp;&amp;amp; &amp;quot;0&amp;quot;        // &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bitwise&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All data in computer memory is stored as sequences of bits; 0&#039;s and 1&#039;s. The bitwise operators work directly with those bits for integer values in Squirrel. As a beginner you aren&#039;t likely to use these operators unless you have a very specific reason to. We won&#039;t go over what each of these does under the hood as it&#039;s a bit out of scope for this language introduction, however if you want to learn more about bits and the bitwise operators, [https://www.learncpp.com/cpp-tutorial/bitwise-operators/ learncpp.com] goes over them quite nicely. (Just ignore the C++ specific stuff.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise NOT&lt;br /&gt;
| ~&lt;br /&gt;
| ~x&lt;br /&gt;
|Flips all bits in x; 1 becomes 0 and 0 becomes 1&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise AND&lt;br /&gt;
| &amp;amp;&lt;br /&gt;
| x &amp;amp; y&lt;br /&gt;
|Each bit in x AND each bit in y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|Each bit in x OR each bit in y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Bitwise XOR&lt;br /&gt;
| ^&lt;br /&gt;
| x ^ y&lt;br /&gt;
|Each bit in x Exclusive OR each bit in y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Left shift&lt;br /&gt;
| &amp;lt;&amp;lt;&lt;br /&gt;
| x &amp;lt;&amp;lt; y&lt;br /&gt;
|Shift all bits in x left by integer y spaces&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Right shift&lt;br /&gt;
| &amp;gt;&amp;gt;&lt;br /&gt;
| x &amp;gt;&amp;gt; y&lt;br /&gt;
|Shift all bits in x right by integer y spaces&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unsigned right shift&lt;br /&gt;
| &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
| x &amp;gt;&amp;gt;&amp;gt; y&lt;br /&gt;
|Same as normal right shift (&amp;gt;&amp;gt;) but treat x as unsigned (only positive values, no negative ones)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For day to day use, you&#039;re mostly going to be using bitwise AND along with bitwise OR to manipulate &#039;&#039;&#039;bit flags&#039;&#039;&#039;, which are variables where each of the 32 bits (or however big the variable is) represents a boolean flag. So instead of having 32 different boolean variables, you can have 1 variable that represents 32 booleans!&lt;br /&gt;
&lt;br /&gt;
The m_fFlags datamap of [[CBaseEntity]] in the Source Engine is a real example of this, each of the 32 bits of the integer can represent a flag. Defined in the source code are macros which contain the values for these bits, as you can see below the left shift operator is used to shift the bits (more accurately the only bit) of integer 1 left by an increasing amount of places.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
#define	FL_ONGROUND				(1&amp;lt;&amp;lt;0)	// At rest / on the ground&lt;br /&gt;
#define FL_DUCKING				(1&amp;lt;&amp;lt;1)	// Player flag -- Player is fully crouched&lt;br /&gt;
#define FL_ANIMDUCKING			(1&amp;lt;&amp;lt;2)	// Player flag -- Player is in the process of crouching or uncrouching but could be in transition&lt;br /&gt;
#define	FL_WATERJUMP			(1&amp;lt;&amp;lt;3)	// player jumping out of water&lt;br /&gt;
#define FL_ONTRAIN				(1&amp;lt;&amp;lt;4)  // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
#define FL_UNBLOCKABLE_BY_PLAYER (1&amp;lt;&amp;lt;31) // pusher that can&#039;t be blocked by the player&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The middle part has been omitted for brevity, the first five macros are equivalent to the integer values: &amp;lt;code&amp;gt;&#039;&#039;&#039;1, 2, 4, 8, and 16&#039;&#039;&#039;&amp;lt;/code&amp;gt; and the last is &amp;lt;code&amp;gt;&#039;&#039;&#039;2147483648&#039;&#039;&#039;&amp;lt;/code&amp;gt;. In VScript, these have been defined in the [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions/Constants#FPlayer FPlayer] enum and can be used in your programs when necessary, however the way to manipulate bit flags is a bit different than regular integers, you can&#039;t just try to add them together with the addition operator!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To add bit flags together, use the bitwise OR (&amp;lt;code&amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// In real code, you would need to prefix these with &amp;quot;Constants.FPlayer.&amp;quot; (e.g. Constants.FPlayer.FL_ONGROUND), this is just a brief demonstration&lt;br /&gt;
&lt;br /&gt;
local mybitflags = FL_ONGROUND | FL_DUCKING | FL_ANIMDUCKING; // 7  (1 + 2 + 4)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a flag, use the bitwise AND (&amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;amp;&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator along with the bitwise NOT (&amp;lt;code&amp;gt;&#039;&#039;&#039;~&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator on the flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// In real code, you would need to prefix these with &amp;quot;Constants.FPlayer.&amp;quot; (e.g. Constants.FPlayer.FL_ONGROUND), this is just a brief demonstration&lt;br /&gt;
&lt;br /&gt;
local mybitflags = FL_ONGROUND | FL_DUCKING | FL_ANIMDUCKING; // 7  (1 + 2 + 4)&lt;br /&gt;
&lt;br /&gt;
printl(mybitflags &amp;amp; ~FL_ONGROUND); // 6&lt;br /&gt;
printl( mybitflags &amp;amp; ~(FL_ONGROUND | FL_ANIMDUCKING) ); // 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test if a flag is present, use the bitwise AND (&amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;amp;&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator and compare the result against 0 using the inequality operator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// In real code, you would need to prefix these with &amp;quot;Constants.FPlayer.&amp;quot; (e.g. Constants.FPlayer.FL_ONGROUND), this is just a brief demonstration&lt;br /&gt;
&lt;br /&gt;
local mybitflags = FL_ONGROUND | FL_DUCKING | FL_ANIMDUCKING;&lt;br /&gt;
local testflags  = FL_ONGROUND | FL_DUCKING;&lt;br /&gt;
&lt;br /&gt;
printl( (mybitflags &amp;amp; testflags) != 0 )  // true&lt;br /&gt;
printl( (mybitflags &amp;amp; FL_ONTRAIN) != 0 ) // false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Other Operators&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in, instanceof, typeof, comma, ternary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Operator Precedence&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-, ~, !, typeof , ++, -- 	highest&lt;br /&gt;
/, *, % 	…&lt;br /&gt;
+, - 	 &lt;br /&gt;
&amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt; 	 &lt;br /&gt;
&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, instanceof 	 &lt;br /&gt;
==, !=, &amp;lt;=&amp;gt; 	 &lt;br /&gt;
&amp;amp; 	 &lt;br /&gt;
^ 	 &lt;br /&gt;
&amp;amp;&amp;amp;, in 	 &lt;br /&gt;
+=, =, -=, /=, *=, %= 	…&lt;br /&gt;
, (comma operator) 	lowest&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7491</id>
		<title>Squirrel Operators</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7491"/>
		<updated>2023-10-31T20:47:55Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Expressions NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you know how to create data and store it into variables, we can now go over how to modify and operate on that data. Operators are used for this purpose, they take one or more operands and produce a result value. Operators which take one operand are called unary operators, two operands are binary operators, and three are ternary operators.&lt;br /&gt;
This section is quite long so don&#039;t worry about memorizing every single operator, just browse through and become familiar with the various types of operators and their uses, you&#039;ll have plenty of examples throughout the rest of the guide to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Arithmetic&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The arithmetic operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039;&amp;lt;/code&amp;gt; are used for, well, arithmetic! Technically we can use them on certain object types (more on in future sections), however by default they&#039;re for use with the integer, float, and (partially) string types. You should be familiar with most of these already.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unary minus&lt;br /&gt;
| -&lt;br /&gt;
| -x&lt;br /&gt;
|Negation of x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 50;&lt;br /&gt;
x = -x; // -50&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Binary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition&lt;br /&gt;
| +&lt;br /&gt;
| x + y&lt;br /&gt;
|x plus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction&lt;br /&gt;
| -&lt;br /&gt;
| x - y&lt;br /&gt;
|x minus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication&lt;br /&gt;
| *&lt;br /&gt;
| x * y&lt;br /&gt;
|x multiplied by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division&lt;br /&gt;
| /&lt;br /&gt;
| x / y&lt;br /&gt;
|x divided by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder&lt;br /&gt;
| %&lt;br /&gt;
| x % y&lt;br /&gt;
|the remainder from: x divided by y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 100 + 100; // 200&lt;br /&gt;
local w = 0 - 2;     // -2&lt;br /&gt;
local x = 5.5 * 100; // 550.0&lt;br /&gt;
local y = 20 / 2;    // 10&lt;br /&gt;
local z = 23 % 2;    // 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The addition operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;+=&#039;&#039;&#039;&amp;lt;/code&amp;gt; are the only operators able to handle string operands. If one operand is a string, Squirrel will try to convert the other operand to a string as well.&lt;br /&gt;
This same type conversion happens between floats and integers for any arithmetic operator (not just addition). If one operand is a float and the other an integer, the resulting value will be a float.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local str1 = &amp;quot;Hello,&amp;quot;;&lt;br /&gt;
local str2 = &amp;quot; World!&amp;quot;;&lt;br /&gt;
str1 += str2; // Hello World!&lt;br /&gt;
// See next section for +=&lt;br /&gt;
&lt;br /&gt;
local float = 10 - 7.0 // 3.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Assignment&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment operator (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) is used for assigning values to variables. It can be combined with the arithmetic operators to create arithmetic assignment operators (e.g. &amp;lt;code&amp;gt;&#039;&#039;&#039;x += 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;), which is a shortened version of: &amp;lt;code&amp;gt;&#039;&#039;&#039;x = x + 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Assignment&lt;br /&gt;
| =&lt;br /&gt;
| x = y&lt;br /&gt;
|assign value y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition Assignment&lt;br /&gt;
| +=&lt;br /&gt;
| x += y&lt;br /&gt;
|assign x + y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction Assignment&lt;br /&gt;
| -=&lt;br /&gt;
| x -= y&lt;br /&gt;
|assign x - y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication Assignment&lt;br /&gt;
| *=&lt;br /&gt;
| x *= y&lt;br /&gt;
|assign x * y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division Assignment&lt;br /&gt;
| /=&lt;br /&gt;
| x /= y&lt;br /&gt;
|assign x / y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder Assignment&lt;br /&gt;
| %=&lt;br /&gt;
| x %= y&lt;br /&gt;
|assign x % y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 100;&lt;br /&gt;
x += 5;   // equivalent to: x = x + 5&lt;br /&gt;
x -= 5;   // 100&lt;br /&gt;
x *= 100; // 10,000&lt;br /&gt;
x /= 2;   // 5,000&lt;br /&gt;
x %= 2;   // 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Increment/Decrement&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The increment and decrement operators are used (respectively) to increase or decrease a variable by 1. This can be done &#039;&#039;&#039;before&#039;&#039;&#039; the variable is returned in the case of the prefixed operators, or it can be done &#039;&#039;&#039;after&#039;&#039;&#039; the variable has been returned in the case of the postfixed operators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-increment&lt;br /&gt;
| ++&lt;br /&gt;
| ++x&lt;br /&gt;
|increment x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-increment&lt;br /&gt;
| ++&lt;br /&gt;
| x++&lt;br /&gt;
|copy x, increment variable x by 1, then return the copy&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-decrement&lt;br /&gt;
| --&lt;br /&gt;
| --x&lt;br /&gt;
|decrement x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-decrement&lt;br /&gt;
| --&lt;br /&gt;
| x--&lt;br /&gt;
|copy x, decrement variable x by 1, then return the copy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 1;&lt;br /&gt;
local y;&lt;br /&gt;
&lt;br /&gt;
y = x++; // y = 1, it got the value of x and then x got incremented, x = 2&lt;br /&gt;
y = ++x; // y = 3, x got incremented and then y got x&#039;s value, x = 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Relational&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The relational operators compare the values of their operands and return a boolean based on their result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Equality&lt;br /&gt;
| ==&lt;br /&gt;
| x == y&lt;br /&gt;
|true if x equals y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Inequality&lt;br /&gt;
| !=&lt;br /&gt;
| x != y&lt;br /&gt;
|true if x does not equal y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than&lt;br /&gt;
| &amp;lt;&lt;br /&gt;
| x &amp;lt; y&lt;br /&gt;
|true if x is less than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than&lt;br /&gt;
| &amp;gt;&lt;br /&gt;
| x &amp;gt; y&lt;br /&gt;
|true if x is greater than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than or equal to&lt;br /&gt;
| &amp;lt;=&lt;br /&gt;
| x &amp;lt;= y&lt;br /&gt;
|true if x is less than or equal to y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than or equal to&lt;br /&gt;
| &amp;gt;=&lt;br /&gt;
| x &amp;gt;= y&lt;br /&gt;
|true if x is greater than or equal to y, false otherwise&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 5;&lt;br /&gt;
local y = 5;&lt;br /&gt;
local z;&lt;br /&gt;
&lt;br /&gt;
z = x == y; // true&lt;br /&gt;
z = x != y; // false&lt;br /&gt;
z = x &amp;gt; y;  // false&lt;br /&gt;
z = x &amp;gt;= y; // true&lt;br /&gt;
z = x &amp;lt; y;  // false&lt;br /&gt;
z = x &amp;lt;= y; // true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Logical&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The logical operators are primarily used in control flow to create condition based code. We&#039;ll go over control flow in a future section, for now just know that they exist and that you can reference back here if you forget what one does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical NOT&lt;br /&gt;
| !&lt;br /&gt;
| !x&lt;br /&gt;
|true if x evaluates to false, otherwise true&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical AND&lt;br /&gt;
| &amp;amp;&amp;amp;&lt;br /&gt;
| x &amp;amp;&amp;amp; y&lt;br /&gt;
|true if both operands evaluate to true, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|true if either operand evaluates to true, otherwise false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For most purposes the above definitions for AND &amp;amp; OR are sufficient, however Squirrel does not simply return boolean true or false for these operators, rather it returns a specific operand passed to the operator based on the result.&lt;br /&gt;
&lt;br /&gt;
Logical AND will return the &#039;&#039;&#039;first&#039;&#039;&#039; operand that evaluates to &#039;&#039;&#039;false&#039;&#039;&#039;, if none do, it will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
Logical OR will return the &#039;&#039;&#039;first&#039;&#039;&#039; operand that evaluates to &#039;&#039;&#039;true&#039;&#039;&#039;, if none do, it will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
A common use case of this functionality with the logical OR operator is to fill a variable with the first value that evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local var = othervar || otherothervar || 1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some cases we may have access to variables that we don&#039;t know if they are null or not. This is a good way of providing &amp;quot;backup&amp;quot; values to use in our program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certain values evaluate to false, these are: &amp;lt;code&amp;gt;&#039;&#039;&#039;false, null, 0, 0.0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Everything else evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 0 &amp;amp;&amp;amp; 1;         // 0&lt;br /&gt;
local w = null || &amp;quot;bark&amp;quot;; // &amp;quot;bark&amp;quot;&lt;br /&gt;
local x = &amp;quot;&amp;quot; || true;     // &amp;quot;&amp;quot;&lt;br /&gt;
local y = !0;             // true&lt;br /&gt;
local z = 5 &amp;amp;&amp;amp; &amp;quot;0&amp;quot;        // &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bitwise&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All data in computer memory is stored as sequences of bits; 0&#039;s and 1&#039;s. The bitwise operators work directly with the bits of variables and literals in Squirrel. These operators are rarely used unless you have very specific needs within your program. For day to day use, you&#039;re mostly going to be using bitwise AND &amp;amp; bitwise OR to manipulate &#039;&#039;&#039;bit flags&#039;&#039;&#039;, which are variables where each of the 32 bits (or however big the variable is) represents a boolean flag. So instead of having 32 different boolean variables, you can have 1 variable that represents 32 booleans!&lt;br /&gt;
&amp;amp;, |, ^, ~, &amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Other Operators&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in, instanceof, typeof, comma, ternary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Operator Precedence&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-, ~, !, typeof , ++, -- 	highest&lt;br /&gt;
/, *, % 	…&lt;br /&gt;
+, - 	 &lt;br /&gt;
&amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt; 	 &lt;br /&gt;
&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, instanceof 	 &lt;br /&gt;
==, !=, &amp;lt;=&amp;gt; 	 &lt;br /&gt;
&amp;amp; 	 &lt;br /&gt;
^ 	 &lt;br /&gt;
&amp;amp;&amp;amp;, in 	 &lt;br /&gt;
+=, =, -=, /=, *=, %= 	…&lt;br /&gt;
, (comma operator) 	lowest&lt;br /&gt;
&lt;br /&gt;
IntegerLiteral        ::=  [1-9][0-9]* | &#039;0x&#039; [0-9A-Fa-f]+ | &#039;&#039;&#039; [.]+ &#039;&#039;&#039; | 0[0-7]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; [0-9]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; &#039;e&#039;|&#039;E&#039; &#039;+&#039;|&#039;-&#039; [0-9]+&lt;br /&gt;
StringLiteral         ::=  &#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;br /&gt;
VerbatimStringLiteral ::=  &#039;@&#039;&#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7490</id>
		<title>Squirrel Operators</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7490"/>
		<updated>2023-10-27T21:55:37Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Expressions NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you know how to create data and store it into variables, we can now go over how to modify and operate on that data. Operators are used for this purpose, they take one or more operands and produce a result value. Operators which take one operand are called unary operators, two operands are binary operators, and three are ternary operators.&lt;br /&gt;
This section is quite long so don&#039;t worry about memorizing every single operator, just browse through and become familiar with the various types of operators and their uses, you&#039;ll have plenty of examples throughout the rest of the guide to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Arithmetic&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The arithmetic operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039;&amp;lt;/code&amp;gt; are used for, well, arithmetic! Technically we can use them on certain object types (more on in future sections), however by default they&#039;re for use with the integer, float, and (partially) string types. You should be familiar with most of these already.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unary minus&lt;br /&gt;
| -&lt;br /&gt;
| -x&lt;br /&gt;
|Negation of x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 50;&lt;br /&gt;
x = -x; // -50&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Binary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition&lt;br /&gt;
| +&lt;br /&gt;
| x + y&lt;br /&gt;
|x plus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction&lt;br /&gt;
| -&lt;br /&gt;
| x - y&lt;br /&gt;
|x minus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication&lt;br /&gt;
| *&lt;br /&gt;
| x * y&lt;br /&gt;
|x multiplied by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division&lt;br /&gt;
| /&lt;br /&gt;
| x / y&lt;br /&gt;
|x divided by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder&lt;br /&gt;
| %&lt;br /&gt;
| x % y&lt;br /&gt;
|the remainder from: x divided by y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 100 + 100; // 200&lt;br /&gt;
local w = 0 - 2;     // -2&lt;br /&gt;
local x = 5.5 * 100; // 550.0&lt;br /&gt;
local y = 20 / 2;    // 10&lt;br /&gt;
local z = 23 % 2;    // 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The addition operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;+=&#039;&#039;&#039;&amp;lt;/code&amp;gt; are the only operators able to handle string operands. If one operand is a string, Squirrel will try to convert the other operand to a string as well.&lt;br /&gt;
This same type conversion happens between floats and integers for any arithmetic operator (not just addition). If one operand is a float and the other an integer, the resulting value will be a float.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local str1 = &amp;quot;Hello,&amp;quot;;&lt;br /&gt;
local str2 = &amp;quot; World!&amp;quot;;&lt;br /&gt;
str1 += str2; // Hello World!&lt;br /&gt;
// See next section for +=&lt;br /&gt;
&lt;br /&gt;
local float = 10 - 7.0 // 3.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Assignment&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment operator (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) is used for assigning values to variables. It can be combined with the arithmetic operators to create arithmetic assignment operators (e.g. &amp;lt;code&amp;gt;&#039;&#039;&#039;x += 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;), which is a shortened version of: &amp;lt;code&amp;gt;&#039;&#039;&#039;x = x + 5&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Assignment&lt;br /&gt;
| =&lt;br /&gt;
| x = y&lt;br /&gt;
|assign value y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition Assignment&lt;br /&gt;
| +=&lt;br /&gt;
| x += y&lt;br /&gt;
|assign x + y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction Assignment&lt;br /&gt;
| -=&lt;br /&gt;
| x -= y&lt;br /&gt;
|assign x - y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication Assignment&lt;br /&gt;
| *=&lt;br /&gt;
| x *= y&lt;br /&gt;
|assign x * y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division Assignment&lt;br /&gt;
| /=&lt;br /&gt;
| x /= y&lt;br /&gt;
|assign x / y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder Assignment&lt;br /&gt;
| %=&lt;br /&gt;
| x %= y&lt;br /&gt;
|assign x % y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 100;&lt;br /&gt;
x += 5;   // equivalent to: x = x + 5&lt;br /&gt;
x -= 5;   // 100&lt;br /&gt;
x *= 100; // 10,000&lt;br /&gt;
x /= 2;   // 5,000&lt;br /&gt;
x %= 2;   // 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Increment/Decrement&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The increment and decrement operators are used (respectively) to increase or decrease a variable by 1. This can be done &#039;&#039;&#039;before&#039;&#039;&#039; the variable is returned in the case of the prefixed operators, or it can be done &#039;&#039;&#039;after&#039;&#039;&#039; the variable has been returned in the case of the postfixed operators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-increment&lt;br /&gt;
| ++&lt;br /&gt;
| ++x&lt;br /&gt;
|increment x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-increment&lt;br /&gt;
| ++&lt;br /&gt;
| x++&lt;br /&gt;
|copy x, increment variable x by 1, then return the copy&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-decrement&lt;br /&gt;
| --&lt;br /&gt;
| --x&lt;br /&gt;
|decrement x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-decrement&lt;br /&gt;
| --&lt;br /&gt;
| x--&lt;br /&gt;
|copy x, decrement variable x by 1, then return the copy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 1;&lt;br /&gt;
local y;&lt;br /&gt;
&lt;br /&gt;
y = x++; // y = 1, it got the value of x and then x got incremented, x = 2&lt;br /&gt;
y = ++x; // y = 3, x got incremented and then y got x&#039;s value, x = 3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Relational&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The relational operators compare the values of their operands and return a boolean based on their result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Equality&lt;br /&gt;
| ==&lt;br /&gt;
| x == y&lt;br /&gt;
|true if x equals y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Inequality&lt;br /&gt;
| !=&lt;br /&gt;
| x != y&lt;br /&gt;
|true if x does not equal y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than&lt;br /&gt;
| &amp;lt;&lt;br /&gt;
| x &amp;lt; y&lt;br /&gt;
|true if x is less than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than&lt;br /&gt;
| &amp;gt;&lt;br /&gt;
| x &amp;gt; y&lt;br /&gt;
|true if x is greater than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than or equal to&lt;br /&gt;
| &amp;lt;=&lt;br /&gt;
| x &amp;lt;= y&lt;br /&gt;
|true if x is less than or equal to y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than or equal to&lt;br /&gt;
| &amp;gt;=&lt;br /&gt;
| x &amp;gt;= y&lt;br /&gt;
|true if x is greater than or equal to y, false otherwise&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 5;&lt;br /&gt;
local y = 5;&lt;br /&gt;
local z;&lt;br /&gt;
&lt;br /&gt;
z = x == y; // true&lt;br /&gt;
z = x != y; // false&lt;br /&gt;
z = x &amp;gt; y;  // false&lt;br /&gt;
z = x &amp;gt;= y; // true&lt;br /&gt;
z = x &amp;lt; y;  // false&lt;br /&gt;
z = x &amp;lt;= y; // true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Logical&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The logical operators are primarily used in control flow to create condition based code. We&#039;ll go over control flow in a future section, for now just know that they exist and that you can reference back here if you forget what one does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical NOT&lt;br /&gt;
| !&lt;br /&gt;
| !x&lt;br /&gt;
|true if x evaluates to false, otherwise true&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical AND&lt;br /&gt;
| &amp;amp;&amp;amp;&lt;br /&gt;
| x &amp;amp;&amp;amp; y&lt;br /&gt;
|true if both operands evaluate to true, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|true if either operand evaluates to true, otherwise false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For most purposes the above definitions for AND &amp;amp; OR are sufficient, however Squirrel does not simply return boolean true or false for these operators, rather it returns a specific operand passed to the operator based on the result.&lt;br /&gt;
&lt;br /&gt;
Logical AND will return the &#039;&#039;&#039;first&#039;&#039;&#039; operand that evaluates to &#039;&#039;&#039;false&#039;&#039;&#039;, if none do, it will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
Logical OR will return the &#039;&#039;&#039;first&#039;&#039;&#039; operand that evaluates to &#039;&#039;&#039;true&#039;&#039;&#039;, if none do, it will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certain values evaluate to false, these are: &amp;lt;code&amp;gt;&#039;&#039;&#039;false, null, 0, 0.0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Everything else evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 0 &amp;amp;&amp;amp; 1;         // 0&lt;br /&gt;
local w = null || &amp;quot;bark&amp;quot;; // &amp;quot;bark&amp;quot;&lt;br /&gt;
local x = &amp;quot;&amp;quot; || true;     // &amp;quot;&amp;quot;&lt;br /&gt;
local y = !0;             // true&lt;br /&gt;
local z = 5 &amp;amp;&amp;amp; &amp;quot;0&amp;quot;        // &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bitwise&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All data in computer memory is stored as sequences of bits; 0&#039;s and 1&#039;s. The bitwise operators work directly with the bits of variables and literals in Squirrel. These operators are rarely used unless you have very specific needs within your program. For day to day use, you&#039;re mostly going to be using bitwise AND &amp;amp; bitwise OR to manipulate &#039;&#039;&#039;bit flags&#039;&#039;&#039;, which are variables where each of the 32 bits (or however big the variable is) represents a boolean flag. So instead of having 32 different boolean variables, you can have 1 variable that represents 32 booleans!&lt;br /&gt;
&amp;amp;, |, ^, ~, &amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Other Operators&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in, instanceof, typeof, comma, ternary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Operator Precedence&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-, ~, !, typeof , ++, -- 	highest&lt;br /&gt;
/, *, % 	…&lt;br /&gt;
+, - 	 &lt;br /&gt;
&amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt; 	 &lt;br /&gt;
&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, instanceof 	 &lt;br /&gt;
==, !=, &amp;lt;=&amp;gt; 	 &lt;br /&gt;
&amp;amp; 	 &lt;br /&gt;
^ 	 &lt;br /&gt;
&amp;amp;&amp;amp;, in 	 &lt;br /&gt;
+=, =, -=, /=, *=, %= 	…&lt;br /&gt;
, (comma operator) 	lowest&lt;br /&gt;
&lt;br /&gt;
IntegerLiteral        ::=  [1-9][0-9]* | &#039;0x&#039; [0-9A-Fa-f]+ | &#039;&#039;&#039; [.]+ &#039;&#039;&#039; | 0[0-7]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; [0-9]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; &#039;e&#039;|&#039;E&#039; &#039;+&#039;|&#039;-&#039; [0-9]+&lt;br /&gt;
StringLiteral         ::=  &#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;br /&gt;
VerbatimStringLiteral ::=  &#039;@&#039;&#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7489</id>
		<title>Squirrel Operators</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7489"/>
		<updated>2023-10-27T20:45:52Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Expressions NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you know how to create data and store it into variables, we can now go over how to modify and operate on that data. Operators are used for this purpose, they take one or more operands and produce a result value. Operators which take one operand are called unary operators, two operands are binary operators, and three are ternary operators.&lt;br /&gt;
This section is quite long so don&#039;t worry about memorizing every single operator, just browse through and become familiar with the various types of operators and their uses, you&#039;ll have plenty of examples throughout the rest of the guide to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Arithmetic&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unary minus&lt;br /&gt;
| -&lt;br /&gt;
| -x&lt;br /&gt;
|Negation of x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 50;&lt;br /&gt;
x = -x; // -50&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Binary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition&lt;br /&gt;
| +&lt;br /&gt;
| x + y&lt;br /&gt;
|x plus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction&lt;br /&gt;
| -&lt;br /&gt;
| x - y&lt;br /&gt;
|x minus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication&lt;br /&gt;
| *&lt;br /&gt;
| x * y&lt;br /&gt;
|x multiplied by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division&lt;br /&gt;
| /&lt;br /&gt;
| x / y&lt;br /&gt;
|x divided by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder&lt;br /&gt;
| %&lt;br /&gt;
| x % y&lt;br /&gt;
|the remainder from: x divided by y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 100 + 100; // 200&lt;br /&gt;
local w = 0 - 2;     // -2&lt;br /&gt;
local x = 5.5 * 100; // 550.0&lt;br /&gt;
local y = 20 / 2;    // 10&lt;br /&gt;
local z = 23 % 2;    // 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The addition operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;+=&#039;&#039;&#039;&amp;lt;/code&amp;gt; are also able to handle string operands. If one operand is a string, Squirrel will try to convert the other operand to a string as well.&lt;br /&gt;
This same type conversion happens between floats and integers for any arithmetic operator (not just addition). If one operand is a float and the other an integer, the resulting value will be a float.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local str1 = &amp;quot;Hello,&amp;quot;;&lt;br /&gt;
local str2 = &amp;quot; World!&amp;quot;;&lt;br /&gt;
str1 += str2; // Hello World!&lt;br /&gt;
// See next section for +=&lt;br /&gt;
&lt;br /&gt;
local float = 10 - 7.0 // 3.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Assignment&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Assignment&lt;br /&gt;
| =&lt;br /&gt;
| x = y&lt;br /&gt;
|assign value y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition Assignment&lt;br /&gt;
| +=&lt;br /&gt;
| x += y&lt;br /&gt;
|assign x + y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction Assignment&lt;br /&gt;
| -=&lt;br /&gt;
| x -= y&lt;br /&gt;
|assign x - y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication Assignment&lt;br /&gt;
| *=&lt;br /&gt;
| x *= y&lt;br /&gt;
|assign x * y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division Assignment&lt;br /&gt;
| /=&lt;br /&gt;
| x /= y&lt;br /&gt;
|assign x / y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder Assignment&lt;br /&gt;
| %=&lt;br /&gt;
| x %= y&lt;br /&gt;
|assign x % y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 100;&lt;br /&gt;
x += 5;   // equivalent to: x = x + 5&lt;br /&gt;
x -= 5;   // 100&lt;br /&gt;
x *= 100; // 10,000&lt;br /&gt;
x /= 2;   // 5,000&lt;br /&gt;
x %= 2;   // 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Increment/Decrement&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-increment&lt;br /&gt;
| ++&lt;br /&gt;
| ++x&lt;br /&gt;
|increment x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-increment&lt;br /&gt;
| ++&lt;br /&gt;
| x++&lt;br /&gt;
|copy x, increment variable x by 1, then return the copy&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-decrement&lt;br /&gt;
| --&lt;br /&gt;
| --x&lt;br /&gt;
|decrement x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-decrement&lt;br /&gt;
| --&lt;br /&gt;
| x--&lt;br /&gt;
|copy x, decrement variable x by 1, then return the copy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 1;&lt;br /&gt;
local y;&lt;br /&gt;
&lt;br /&gt;
y = x++; // y = 1, it got the value of x and then x got incremented, x = 2&lt;br /&gt;
y = ++x; // y = 3, x got incremented and then y got x&#039;s value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Relational&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Equality&lt;br /&gt;
| ==&lt;br /&gt;
| x == y&lt;br /&gt;
|true if x equals y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Inequality&lt;br /&gt;
| !=&lt;br /&gt;
| x != y&lt;br /&gt;
|true if x does not equal y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than&lt;br /&gt;
| &amp;lt;&lt;br /&gt;
| x &amp;lt; y&lt;br /&gt;
|true if x is less than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than&lt;br /&gt;
| &amp;gt;&lt;br /&gt;
| x &amp;gt; y&lt;br /&gt;
|true if x is greater than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than or equal to&lt;br /&gt;
| &amp;lt;=&lt;br /&gt;
| x &amp;lt;= y&lt;br /&gt;
|true if x is less than or equal to y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than or equal to&lt;br /&gt;
| &amp;gt;=&lt;br /&gt;
| x &amp;gt;= y&lt;br /&gt;
|true if x is greater than or equal to y, false otherwise&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 5;&lt;br /&gt;
local y = 5;&lt;br /&gt;
local z;&lt;br /&gt;
&lt;br /&gt;
z = x == y; // true&lt;br /&gt;
z = x != y; // false&lt;br /&gt;
z = x &amp;gt; y;  // false&lt;br /&gt;
z = x &amp;gt;= y; // true&lt;br /&gt;
z = x &amp;lt; y;  // false&lt;br /&gt;
z = x &amp;lt;= y; // true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Logical&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical NOT&lt;br /&gt;
| !&lt;br /&gt;
| !x&lt;br /&gt;
|true if x evaluates to false, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical AND&lt;br /&gt;
| &amp;amp;&amp;amp;&lt;br /&gt;
| x &amp;amp;&amp;amp; y&lt;br /&gt;
|true if both operands evaluate to true, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|true if either operand evaluates to true, otherwise false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For most purposes the above definitions for AND &amp;amp; OR are sufficient, however Squirrel does not simply return boolean true or false for these operators, rather it returns a specific operand passed to the operator based on the result.&lt;br /&gt;
&lt;br /&gt;
Logical AND will return the &#039;&#039;&#039;first&#039;&#039;&#039; operand that evaluates to false, if none do and both evaluate true the operator will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
Logical OR will return the first operand that evaluates to true, if none do, it will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certain values evaluate to false, these are: &amp;lt;code&amp;gt;&#039;&#039;&#039;false, null, 0, 0.0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Everything else evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 0 &amp;amp;&amp;amp; 1;         // 0&lt;br /&gt;
local w = null || &amp;quot;bark&amp;quot;; // &amp;quot;bark&amp;quot;&lt;br /&gt;
local x = &amp;quot;&amp;quot; || true;     // &amp;quot;&amp;quot;&lt;br /&gt;
local y = !0;             // true&lt;br /&gt;
local z = 5 &amp;amp;&amp;amp; &amp;quot;0&amp;quot;        // &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bitwise&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;, |, ^, ~, &amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Other Operators&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in, instanceof, typeof, comma, ternary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Operator Precedence&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-, ~, !, typeof , ++, -- 	highest&lt;br /&gt;
/, *, % 	…&lt;br /&gt;
+, - 	 &lt;br /&gt;
&amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt; 	 &lt;br /&gt;
&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, instanceof 	 &lt;br /&gt;
==, !=, &amp;lt;=&amp;gt; 	 &lt;br /&gt;
&amp;amp; 	 &lt;br /&gt;
^ 	 &lt;br /&gt;
&amp;amp;&amp;amp;, in 	 &lt;br /&gt;
+=, =, -=, /=, *=, %= 	…&lt;br /&gt;
, (comma operator) 	lowest&lt;br /&gt;
&lt;br /&gt;
IntegerLiteral        ::=  [1-9][0-9]* | &#039;0x&#039; [0-9A-Fa-f]+ | &#039;&#039;&#039; [.]+ &#039;&#039;&#039; | 0[0-7]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; [0-9]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; &#039;e&#039;|&#039;E&#039; &#039;+&#039;|&#039;-&#039; [0-9]+&lt;br /&gt;
StringLiteral         ::=  &#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;br /&gt;
VerbatimStringLiteral ::=  &#039;@&#039;&#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Data_Types&amp;diff=7488</id>
		<title>Squirrel Data Types</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Data_Types&amp;diff=7488"/>
		<updated>2023-10-27T20:31:14Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Operators NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data stored in variables can have a number of different types which determines what type of object it is and what you can do with it. Below is the full list of data types in Squirrel, however we will only go over the primitive ones in this section. The other data types will receive their own sections later in the guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data Types:&#039;&#039;&#039;&lt;br /&gt;
* Null&lt;br /&gt;
* Integer&lt;br /&gt;
* Bool&lt;br /&gt;
* Float&lt;br /&gt;
* String&lt;br /&gt;
* Table&lt;br /&gt;
* Array&lt;br /&gt;
* Function&lt;br /&gt;
* Generator&lt;br /&gt;
* Class&lt;br /&gt;
* Instance&lt;br /&gt;
* Thread&lt;br /&gt;
* Userdata&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a variable&#039;s data type as a string (see below on strings), you can use the &amp;lt;code&amp;gt;&#039;&#039;&#039;typeof&#039;&#039;&#039;&amp;lt;/code&amp;gt; operator.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local t = typeof 5; // &amp;quot;integer&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Null&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Has one value: &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, it represents the non-existence or lack of a value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x; // null&lt;br /&gt;
&lt;br /&gt;
local y = 5;&lt;br /&gt;
// ...&lt;br /&gt;
y = null;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Integer&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a 32 bit whole number, meaning it can store any value from -2,147,483,648 to 2,147,483,647. You can specify the integer base as [https://en.wikipedia.org/wiki/Hexadecimal hexadecimal] by prefixing with &amp;lt;code&amp;gt;&#039;&#039;&#039;0x&#039;&#039;&#039;&amp;lt;/code&amp;gt; or [https://en.wikipedia.org/wiki/Octal octal] with &amp;lt;code&amp;gt;&#039;&#039;&#039;0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. You can also specify [https://www.asciitable.com/ ASCII] char codes between single quotes &#039;&#039;&#039;&amp;lt;code&amp;gt;&#039;&amp;lt;/code&amp;gt;&#039;&#039;&#039; which will be stored as their integer value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 12345;    // Decimal&lt;br /&gt;
local y = 0xFFFFFF; // Hexadecimal begins with 0x&lt;br /&gt;
local z = 050;      // Octal begins with 0&lt;br /&gt;
local c = &#039;a&#039;;      // Char code stored as 97&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are all integer &#039;&#039;&#039;literals&#039;&#039;&#039;, which are hard coded pieces of data within a program for a specific data type. Other types have literals as well which you&#039;ll see in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bool&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Has two values: &amp;lt;code&amp;gt;&#039;&#039;&#039;true&#039;&#039;&#039;&amp;lt;/code&amp;gt; and  &amp;lt;code&amp;gt;&#039;&#039;&#039;false&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local is_stuck     = false;&lt;br /&gt;
local should_round = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Float&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a 32 bit floating point number, meaning it can store any decimal value from 1.18e-38 to 3.4e38. Due to how floating point numbers are stored in memory, they have a limited amount of accuracy for a certain number of significant digits, for a 32 bit float it&#039;s usually around 6 or 7 digits. Any additional digits for the float value may result in rounding errors and precision loss. Keep this in mind when you&#039;re working with floats.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local float1 = 1.23456;  // 1.23456 (Regular float literal)&lt;br /&gt;
local float2 = 1.2e34;   // 1.2e+34  (Scientific notation float literal)&lt;br /&gt;
&lt;br /&gt;
// Precision loss&lt;br /&gt;
local float3 = 1.234567; // 1.23457&lt;br /&gt;
local float4 = 1234.567; // 1234.57&lt;br /&gt;
local float5 = 123456.7; // 123457&lt;br /&gt;
local float6 = 12345678999.0; // 1.23457e+10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You cannot have a leading floating point for float literals, they must start with at least one digit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// Invalid&lt;br /&gt;
local float1 = .123;&lt;br /&gt;
local float2 = .12E5;&lt;br /&gt;
&lt;br /&gt;
// Valid&lt;br /&gt;
local float3 = 0.123;&lt;br /&gt;
local float4 = 0.12E5;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;String&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Strings are a sequence of characters with any length between quotation marks &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;. Strings are immutable, meaning they cannot be modified and you must create a new string if you need to change the old one. Regular strings must begin and end on the same line, they cannot contain any new line characters (\n).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// Strings ...&lt;br /&gt;
local str1 = &amp;quot;The quick brown fox jumps over the lazy dog.&amp;quot;; // String&lt;br /&gt;
local str2 = &amp;quot;123&amp;quot;; // String with number characters, not an integer&lt;br /&gt;
local str3 = &amp;quot;a&amp;quot;;   // String&lt;br /&gt;
local str4 = &amp;quot;&amp;quot;;    // Empty string&lt;br /&gt;
&lt;br /&gt;
// ... compared to char codes&lt;br /&gt;
local int1 = &#039;a&#039;;   // NOT a string&lt;br /&gt;
local int2 = &#039;&#039;;    // Compile error&lt;br /&gt;
local int3 = &#039;&#039;&#039;;   // Compile error&lt;br /&gt;
local int4 = &#039;\&#039;&#039;;  // 39, Valid char code for &#039; (explained below)&lt;br /&gt;
&lt;br /&gt;
// Need to make a new string if we want to modify&lt;br /&gt;
local name = &amp;quot;bar&amp;quot;;&lt;br /&gt;
name = &amp;quot;barber&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Strings (and char literals) may contain [https://en.cppreference.com/w/c/language/escape escape sequences], which are special characters that denote that something special should happen. Even though they have multiple characters in their definition, they count as one character when actually in use.&lt;br /&gt;
Here are the ones you&#039;re most likely to use:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\t&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Display a tab&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\n&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Move to a new line&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\\&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert \ char&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert &amp;quot; char&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\&#039;&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert &#039; char&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local text  = &amp;quot;Hello there! Please enter your class:\t&amp;quot;;    // Tab&lt;br /&gt;
local text2 = &amp;quot;What do you mean you don&#039;t \&amp;quot;have one\&amp;quot;?\n&amp;quot;; // &amp;quot; char and new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There may come a time when you need a string that does not interpret escape sequences or that can span multiple lines, which is where verbatim strings come in handy. Verbatim strings begin with &amp;lt;code&amp;gt;&#039;&#039;&#039;@&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt; and end with a regular quote &amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local mystring = @&amp;quot;eenie&lt;br /&gt;
meenie&lt;br /&gt;
minie&lt;br /&gt;
moe&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also need to add quote characters within the verbatim string, to do so you double up each quotation &amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;quot;&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;. The double quote will be replaced with a single quote by the compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local mystring = @&amp;quot;eenie&lt;br /&gt;
&amp;quot;&amp;quot;meenie&amp;quot;&amp;quot;&lt;br /&gt;
minie&lt;br /&gt;
moe&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Data_Types&amp;diff=7487</id>
		<title>Squirrel Data Types</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Data_Types&amp;diff=7487"/>
		<updated>2023-10-27T20:24:13Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Operators NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data stored in variables can have a number of different types which determines what type of object it is and what you can do with it. Below is the full list of data types in Squirrel, however we will only go over the primitive ones in this section. The other data types will receive their own sections later in the guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data Types:&#039;&#039;&#039;&lt;br /&gt;
* Null&lt;br /&gt;
* Integer&lt;br /&gt;
* Bool&lt;br /&gt;
* Float&lt;br /&gt;
* String&lt;br /&gt;
* Table&lt;br /&gt;
* Array&lt;br /&gt;
* Function&lt;br /&gt;
* Generator&lt;br /&gt;
* Class&lt;br /&gt;
* Instance&lt;br /&gt;
* Thread&lt;br /&gt;
* Userdata&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a variable&#039;s data type as a string (see below on strings), you can use the &amp;lt;code&amp;gt;&#039;&#039;&#039;typeof&#039;&#039;&#039;&amp;lt;/code&amp;gt; operator.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local t = typeof 5; // &amp;quot;integer&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Null&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Has one value: &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, it represents the non-existence or lack of a value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x; // null&lt;br /&gt;
&lt;br /&gt;
local y = 5;&lt;br /&gt;
// ...&lt;br /&gt;
y = null;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Integer&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a 32 bit whole number, meaning it can store any value from -2,147,483,648 to 2,147,483,647. You can specify the integer base as [https://en.wikipedia.org/wiki/Hexadecimal hexadecimal] by prefixing with &amp;lt;code&amp;gt;&#039;&#039;&#039;0x&#039;&#039;&#039;&amp;lt;/code&amp;gt; or [https://en.wikipedia.org/wiki/Octal octal] with &amp;lt;code&amp;gt;&#039;&#039;&#039;0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. You can also specify [https://www.asciitable.com/ ASCII] char codes between single quotes &#039;&#039;&#039;&amp;lt;code&amp;gt;&#039;&amp;lt;/code&amp;gt;&#039;&#039;&#039; which will be stored as their integer value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 12345;    // Decimal&lt;br /&gt;
local y = 0xFFFFFF; // Hexadecimal begins with 0x&lt;br /&gt;
local z = 050;      // Octal begins with 0&lt;br /&gt;
local c = &#039;a&#039;;      // Char code stored as 97&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are all integer &#039;&#039;&#039;literals&#039;&#039;&#039;, which are hard coded pieces of data within a program for a specific data type. Other types have literals as well which you&#039;ll see in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bool&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Has two values: &amp;lt;code&amp;gt;&#039;&#039;&#039;true&#039;&#039;&#039;&amp;lt;/code&amp;gt; and  &amp;lt;code&amp;gt;&#039;&#039;&#039;false&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local is_stuck     = false;&lt;br /&gt;
local should_round = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Float&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a 32 bit floating point number, meaning it can store any decimal value from 1.18e-38 to 3.4e38. Due to how floating point numbers are stored in memory, they have a limited amount of accuracy for a certain number of significant digits, for a 32 bit float it&#039;s usually around 6 or 7 digits. Any additional digits for the float value may result in rounding errors and precision loss. Keep this in mind when you&#039;re working with floats.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local float1 = 1.23456;  // 1.23456 (Regular float literal)&lt;br /&gt;
local float2 = 1.2e34;   // 1.2e+34  (Scientific notation float literal)&lt;br /&gt;
&lt;br /&gt;
// Precision loss&lt;br /&gt;
local float3 = 1.234567; // 1.23457&lt;br /&gt;
local float4 = 1234.567; // 1234.57&lt;br /&gt;
local float5 = 123456.7; // 123457&lt;br /&gt;
local float6 = 12345678999.0; // 1.23457e+10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You cannot have a leading floating point for float literals, they must start with at least one digit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// Invalid&lt;br /&gt;
local float1 = .123;&lt;br /&gt;
local float2 = .12E5;&lt;br /&gt;
&lt;br /&gt;
// Valid&lt;br /&gt;
local float3 = 0.123;&lt;br /&gt;
local float4 = 0.12E5;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;String&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Strings are a sequence of characters with any length between quotation marks &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;. Strings are immutable, meaning they cannot be modified and you must create a new string if you need to change the old one. Regular strings must begin and end on the same line, they cannot contain any new line characters (\n).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// Strings ...&lt;br /&gt;
local str1 = &amp;quot;The quick brown fox jumps over the lazy dog.&amp;quot;; // String&lt;br /&gt;
local str2 = &amp;quot;123&amp;quot;; // String with number characters, not an integer&lt;br /&gt;
local str3 = &amp;quot;a&amp;quot;;   // String&lt;br /&gt;
local str4 = &amp;quot;&amp;quot;;    // Empty string&lt;br /&gt;
&lt;br /&gt;
// ... compared to char codes&lt;br /&gt;
local int1 = &#039;a&#039;;   // NOT a string&lt;br /&gt;
local int2 = &#039;&#039;;    // Compile error&lt;br /&gt;
local int3 = &#039;&#039;&#039;;   // Compile error&lt;br /&gt;
local int4 = &#039;\&#039;&#039;;  // 39, Valid char code for &#039; (explained below)&lt;br /&gt;
&lt;br /&gt;
// Need to make a new string if we want to modify&lt;br /&gt;
local name = &amp;quot;bar&amp;quot;;&lt;br /&gt;
name = &amp;quot;barber&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Strings (and char literals) may contain [https://en.cppreference.com/w/c/language/escape escape sequences], which special are characters that denote that something special should happen. Even though they have multiple characters in their definition, they count as one character when actually in use.&lt;br /&gt;
Here are the ones you&#039;re most likely to use:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\t&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Display a tab&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\n&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Move to a new line&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\\&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert \ char&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert &amp;quot; char&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\&#039;&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert &#039; char&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local text  = &amp;quot;Hello there! Please enter your class:\t&amp;quot;;    // Tab&lt;br /&gt;
local text2 = &amp;quot;What do you mean you don&#039;t \&amp;quot;have one\&amp;quot;?\n&amp;quot;; // &amp;quot; char and new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There may come a time when you need a string that does not interpret escape sequences or that can span multiple lines, which is where verbatim strings come in handy. Verbatim strings begin with &amp;lt;code&amp;gt;&#039;&#039;&#039;@&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt; and end with a regular quote &amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local mystring = @&amp;quot;eenie&lt;br /&gt;
meenie&lt;br /&gt;
minie&lt;br /&gt;
moe&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also need to add quote characters within the verbatim string, to do so you double up each quotation &amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;quot;&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;. The double quote will be replaced with a single quote by the compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local mystring = @&amp;quot;eenie&lt;br /&gt;
&amp;quot;&amp;quot;meenie&amp;quot;&amp;quot;&lt;br /&gt;
minie&lt;br /&gt;
moe&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Metamethods&amp;diff=7486</id>
		<title>Squirrel Metamethods</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Metamethods&amp;diff=7486"/>
		<updated>2023-10-27T03:50:03Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Inheritance BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Variables BACK TO START]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Inheritance&amp;diff=7485</id>
		<title>Squirrel Inheritance</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Inheritance&amp;diff=7485"/>
		<updated>2023-10-27T03:49:54Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Classes BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Metamethods NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Classes&amp;diff=7484</id>
		<title>Squirrel Classes</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Classes&amp;diff=7484"/>
		<updated>2023-10-27T03:49:43Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Weak_References BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Inheritance NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Weak_References&amp;diff=7483</id>
		<title>Squirrel Weak References</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Weak_References&amp;diff=7483"/>
		<updated>2023-10-27T03:49:32Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Delegation BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Classes NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Delegation&amp;diff=7482</id>
		<title>Squirrel Delegation</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Delegation&amp;diff=7482"/>
		<updated>2023-10-27T03:49:22Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Generators BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Weak_References NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Generators&amp;diff=7481</id>
		<title>Squirrel Generators</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Generators&amp;diff=7481"/>
		<updated>2023-10-27T03:49:11Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Functions BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Delegation NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Functions&amp;diff=7480</id>
		<title>Squirrel Functions</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Functions&amp;diff=7480"/>
		<updated>2023-10-27T03:48:59Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Tables BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Generators NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Tables&amp;diff=7479</id>
		<title>Squirrel Tables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Tables&amp;diff=7479"/>
		<updated>2023-10-27T03:48:48Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Arrays BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Functions NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Arrays&amp;diff=7478</id>
		<title>Squirrel Arrays</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Arrays&amp;diff=7478"/>
		<updated>2023-10-27T03:48:37Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Enums BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Tables NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Enums&amp;diff=7477</id>
		<title>Squirrel Enums</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Enums&amp;diff=7477"/>
		<updated>2023-10-27T03:48:27Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Exceptions BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Arrays NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Exceptions&amp;diff=7476</id>
		<title>Squirrel Exceptions</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Exceptions&amp;diff=7476"/>
		<updated>2023-10-27T03:48:16Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Enums NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Control_Flow&amp;diff=7475</id>
		<title>Squirrel Control Flow</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Control_Flow&amp;diff=7475"/>
		<updated>2023-10-27T03:48:06Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Scopes BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Exceptions NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Scopes&amp;diff=7474</id>
		<title>Squirrel Scopes</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Scopes&amp;diff=7474"/>
		<updated>2023-10-27T03:47:56Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Control_Flow NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Intro_to_Objects&amp;diff=7473</id>
		<title>Squirrel Intro to Objects</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Intro_to_Objects&amp;diff=7473"/>
		<updated>2023-10-27T03:47:45Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Scopes NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Intro_to_Functions&amp;diff=7472</id>
		<title>Squirrel Intro to Functions</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Intro_to_Functions&amp;diff=7472"/>
		<updated>2023-10-27T03:47:34Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Expressions BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Objects NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Expressions&amp;diff=7471</id>
		<title>Squirrel Expressions</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Expressions&amp;diff=7471"/>
		<updated>2023-10-27T03:47:23Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Operators BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Intro_to_Functions NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7470</id>
		<title>Squirrel Variables</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Variables&amp;diff=7470"/>
		<updated>2023-10-27T03:47:03Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every program in any programming language is comprised of a set of instructions called &#039;&#039;&#039;statements&#039;&#039;&#039; which manipulate data to produce a desired result. Programs store data into regions of memory as &#039;&#039;&#039;objects&#039;&#039;&#039;. Objects which we give an &#039;&#039;&#039;identifier&#039;&#039;&#039; (name) in our programs are called &#039;&#039;&#039;variables&#039;&#039;&#039;. You can think of statements as analogous to sentences in the language we speak to each other, each requires a specific set of items to be considered valid, and each is ended with a specific character. Sentences are mostly ended with periods, and statements always end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Identifiers have a few considerations to keep in mind:&lt;br /&gt;
* &#039;&#039;&#039;They are case-sensitive, wep is not the same as WEP&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;The first character must be alphabetical (a-z) or an underscore, afterwards they can have any combination of (a-z), (0-9), or underscores&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Underscores are the only special character allowed, nothing else&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Valid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* INDEX&lt;br /&gt;
* _weapon&lt;br /&gt;
* weapon_sequence&lt;br /&gt;
* player123&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invalid Identifiers:&#039;&#039;&#039;&lt;br /&gt;
* starting-index&lt;br /&gt;
* 1_ring_to_rule_them_all&lt;br /&gt;
* BOLD&amp;amp;BRASH&lt;br /&gt;
* $IMBATMAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition, identifiers cannot be the same name as a &#039;&#039;&#039;keyword&#039;&#039;&#039;, which are special identifiers reserved by the language for its use in the syntax. We&#039;ll go over most of these throughout the guide, so don&#039;t worry about memorizing them just yet.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:75%; margin:auto; text-align:center font-weight:bold; font-size:125%&amp;quot;&lt;br /&gt;
|+Keywords&lt;br /&gt;
|base&lt;br /&gt;
|break&lt;br /&gt;
|case&lt;br /&gt;
|catch&lt;br /&gt;
|class&lt;br /&gt;
|clone&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|const&lt;br /&gt;
|default&lt;br /&gt;
|delete&lt;br /&gt;
|else&lt;br /&gt;
|enum&lt;br /&gt;
|-&lt;br /&gt;
|extends&lt;br /&gt;
|for&lt;br /&gt;
|foreach&lt;br /&gt;
|function&lt;br /&gt;
|if&lt;br /&gt;
|in&lt;br /&gt;
|-&lt;br /&gt;
|local&lt;br /&gt;
|null&lt;br /&gt;
|resume&lt;br /&gt;
|return&lt;br /&gt;
|switch&lt;br /&gt;
|this&lt;br /&gt;
|-&lt;br /&gt;
|throw&lt;br /&gt;
|try&lt;br /&gt;
|typeof&lt;br /&gt;
|while&lt;br /&gt;
|yield&lt;br /&gt;
|constructor&lt;br /&gt;
|-&lt;br /&gt;
|instanceof&lt;br /&gt;
|true&lt;br /&gt;
|false&lt;br /&gt;
|static&lt;br /&gt;
|__LINE__&lt;br /&gt;
|__FILE__&lt;br /&gt;
|-&lt;br /&gt;
|rawcall&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-top: 50px;&amp;quot;&amp;gt;To define a variable with x as it&#039;s identifier, we use the &amp;lt;code&amp;gt;&#039;&#039;&#039;local&#039;&#039;&#039;&amp;lt;/code&amp;gt; keyword:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;quot;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We created our variable in this statement but we haven&#039;t given it a value, so currently the value for x is &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, which is a special value representing the lack of a value. To give our variable an actual value we have two options; we can set it at the time of definition (which is called initialization), or we can assign it a value with the assignment (&amp;lt;code&amp;gt;&#039;&#039;&#039;=&#039;&#039;&#039;&amp;lt;/code&amp;gt;) operator in a separate statement, or both!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x;&lt;br /&gt;
local y = 10;&lt;br /&gt;
&lt;br /&gt;
printl(y);&lt;br /&gt;
&lt;br /&gt;
x = 0;&lt;br /&gt;
y = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we define x and initialize y to 10, print y to console, and then set them both to 0 afterwards.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Comments&amp;diff=7469</id>
		<title>Squirrel Comments</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Comments&amp;diff=7469"/>
		<updated>2023-10-27T03:46:47Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Variables BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A comment is a human readable note which was inserted by a programmer to denote the what, how, or why behind code. Comments are ignored by the compiler and only serve to make the code easier to understand or use for programmers. Comments come in two flavors: single line and multi line comments. Single line comments go until they hit a new line character (\n). Multi line comments have a start and end token, anything between them is commented out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To insert a single line comment, prefix it with &amp;lt;code&amp;gt;&#039;&#039;&#039;//&#039;&#039;&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;&#039;&#039;#&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// I&#039;m a comment that takes the whole line&lt;br /&gt;
local darth_variable = 404 # I&#039;m an inline comment&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To insert a multi line comment, use &amp;lt;code&amp;gt;&#039;&#039;&#039;/*&#039;&#039;&#039;&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;&#039;&#039;&#039;*/&#039;&#039;&#039;&amp;lt;/code&amp;gt; to end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
/*I&lt;br /&gt;
      am&lt;br /&gt;
          a&lt;br /&gt;
      multi&lt;br /&gt;
  line&lt;br /&gt;
comment&lt;br /&gt;
*/&lt;br /&gt;
local foo = 2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can &amp;quot;nest&amp;quot; single line comments, but you can&#039;t do this with multi line comments&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
//////////////////////// okay&lt;br /&gt;
/* // okay */&lt;br /&gt;
/* /* not okay */ */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The compiler will end the multi line comment at the first end token (*/) it sees, so the second one is outside of any comments and results in a compile error.&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Data_Types&amp;diff=7468</id>
		<title>Squirrel Data Types</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Data_Types&amp;diff=7468"/>
		<updated>2023-10-27T03:46:37Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Comments BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Operators NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data stored in variables can have a number of different types which determines what type of object it is and what you can do with it. Below is the full list of data types in Squirrel, however we will only go over the primitive ones in this section. The other data types will receive their own sections later in the guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data Types:&#039;&#039;&#039;&lt;br /&gt;
* Null&lt;br /&gt;
* Integer&lt;br /&gt;
* Bool&lt;br /&gt;
* Float&lt;br /&gt;
* String&lt;br /&gt;
* Table&lt;br /&gt;
* Array&lt;br /&gt;
* Function&lt;br /&gt;
* Generator&lt;br /&gt;
* Class&lt;br /&gt;
* Instance&lt;br /&gt;
* Thread&lt;br /&gt;
* Userdata&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a variable&#039;s data type as a string (see below on strings), you can use the &amp;lt;code&amp;gt;&#039;&#039;&#039;typeof&#039;&#039;&#039;&amp;lt;/code&amp;gt; operator.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local t = typeof 5; // &amp;quot;integer&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Null&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Has one value: &amp;lt;code&amp;gt;&#039;&#039;&#039;null&#039;&#039;&#039;&amp;lt;/code&amp;gt;, it represents the non-existence or lack of a value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x; // null&lt;br /&gt;
&lt;br /&gt;
local y = 5;&lt;br /&gt;
// ...&lt;br /&gt;
y = null;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Integer&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a 32 bit whole number, meaning it can store any value from -2,147,483,648 to 2,147,483,647. You can specify the integer base as [https://en.wikipedia.org/wiki/Hexadecimal hexadecimal] by prefixing with &amp;lt;code&amp;gt;&#039;&#039;&#039;0x&#039;&#039;&#039;&amp;lt;/code&amp;gt; or [https://en.wikipedia.org/wiki/Octal octal] with &amp;lt;code&amp;gt;&#039;&#039;&#039;0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. You can also specify [https://www.asciitable.com/ ASCII] char codes between single quotes &#039;&#039;&#039;&amp;lt;code&amp;gt;&#039;&amp;lt;/code&amp;gt;&#039;&#039;&#039; which will be stored as their integer value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 12345;    // Decimal&lt;br /&gt;
local y = 0xFFFFFF; // Hexadecimal begins with 0x&lt;br /&gt;
local z = 050;      // Octal begins with 0&lt;br /&gt;
local c = &#039;a&#039;;      // Char code stored as 97&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are all integer &#039;&#039;&#039;literals&#039;&#039;&#039;, which are hard coded pieces of data within a program for a specific data type. Other types have literals as well which you&#039;ll see in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bool&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Has two values: &amp;lt;code&amp;gt;&#039;&#039;&#039;true&#039;&#039;&#039;&amp;lt;/code&amp;gt; and  &amp;lt;code&amp;gt;&#039;&#039;&#039;false&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local is_stuck     = false;&lt;br /&gt;
local should_round = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Float&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a 32 bit floating point number, meaning it can store any decimal value from 1.18e-38 to 3.4e38. Due to how floating point numbers are stored in memory, they have a limited amount of accuracy for a certain number of significant digits, for a 32 bit float it&#039;s usually around 6 or 7 digits. Any additional digits for the float value may result in rounding errors and precision loss. Keep this in mind when you&#039;re working with floats.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local float1 = 1.23456;  // 1.23456 (Regular float literal)&lt;br /&gt;
local float2 = 1.2e34;   // 1.2e+34  (Scientific notation float literal)&lt;br /&gt;
&lt;br /&gt;
// Precision loss&lt;br /&gt;
local float3 = 1.234567; // 1.23457&lt;br /&gt;
local float4 = 1234.567; // 1234.57&lt;br /&gt;
local float5 = 123456.7; // 123457&lt;br /&gt;
local float6 = 12345678999.0; // 1.23457e+10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You cannot have a leading floating point for float literals, they must start with at least one digit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// Invalid&lt;br /&gt;
local float1 = .123;&lt;br /&gt;
local float2 = .12E5;&lt;br /&gt;
&lt;br /&gt;
// Valid&lt;br /&gt;
local float3 = 0.123;&lt;br /&gt;
local float4 = 0.12E5;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;String&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Strings are a sequence of characters with any length between quotation marks &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;. Strings are immutable, meaning they cannot be modified and you must create a new string if you need to change the old one. Regular strings must begin and end on the same line, they cannot contain any new line characters (\n).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
// Strings ...&lt;br /&gt;
local str1 = &amp;quot;&#039;&#039;&#039;@!(&amp;amp;(*@!%&amp;amp;!(%!%(%&amp;amp;FJSGADFJKL@fadjsh141a=-&amp;quot;; // String&lt;br /&gt;
local str2 = &amp;quot;123&amp;quot;; // String with number characters, not an integer&lt;br /&gt;
local str3 = &amp;quot;a&amp;quot;;   // String&lt;br /&gt;
local str4 = &amp;quot;&amp;quot;;    // Empty string&lt;br /&gt;
&lt;br /&gt;
// ... compared to char codes&lt;br /&gt;
local int1 = &#039;a&#039;;   // NOT a string&lt;br /&gt;
local int2 = &#039;&#039;;    // Compile error&lt;br /&gt;
local int3 = &#039;&#039;&#039;;   // Compile error&lt;br /&gt;
local int4 = &#039;\&#039;&#039;;  // 39, Valid char code for &#039; (explained below)&lt;br /&gt;
&lt;br /&gt;
// Need to make a new string if we want to modify&lt;br /&gt;
local name = &amp;quot;bar&amp;quot;;&lt;br /&gt;
name = &amp;quot;barber&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Strings (and char literals) may contain [https://en.cppreference.com/w/c/language/escape escape sequences], which special are characters that denote that something special should happen. Even though they have multiple characters in their definition, they count as one character when actually in use.&lt;br /&gt;
Here are the ones you&#039;re most likely to use:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\t&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Display a tab&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\n&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Move to a new line&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\\&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert \ char&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert &amp;quot; char&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;\&#039;&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Insert &#039; char&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local text  = &amp;quot;Hello there! Please enter your class:\t&amp;quot;;    // Tab&lt;br /&gt;
local text2 = &amp;quot;What do you mean you don&#039;t \&amp;quot;have one\&amp;quot;?\n&amp;quot;; // &amp;quot; char and new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There may come a time when you need a string that does not interpret escape sequences or that can span multiple lines, which is where verbatim strings come in handy. Verbatim strings begin with &amp;lt;code&amp;gt;&#039;&#039;&#039;@&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt; and end with a regular quote &amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local mystring = @&amp;quot;eenie&lt;br /&gt;
meenie&lt;br /&gt;
minie&lt;br /&gt;
moe&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also need to add quote characters within the verbatim string, to do so you double up each quotation &amp;lt;code&amp;gt;&#039;&#039;&#039;&amp;quot;&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;. The double quote will be replaced with a single quote by the compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local mystring = @&amp;quot;eenie&lt;br /&gt;
&amp;quot;&amp;quot;meenie&amp;quot;&amp;quot;&lt;br /&gt;
minie&lt;br /&gt;
moe&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7467</id>
		<title>Squirrel Operators</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Operators&amp;diff=7467"/>
		<updated>2023-10-27T03:46:14Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Data_Types BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; z-index: 1; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Expressions NEXT]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you know how to create data and store it into variables, we can now go over how to modify and operate on that data. Operators are used for this purpose, they take one or more operands and produce a result value. Operators which take one operand are called unary operators, two operands are binary operators, and three are ternary operators.&lt;br /&gt;
This section is quite long so don&#039;t worry about memorizing every single operator, just browse through and become familiar with the various types of operators and their uses, you&#039;ll have plenty of examples throughout the rest of the guide to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Arithmetic&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Unary minus&lt;br /&gt;
| -&lt;br /&gt;
| -x&lt;br /&gt;
|Negation of x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 50;&lt;br /&gt;
x = -x; // -50&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Binary Operators&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition&lt;br /&gt;
| +&lt;br /&gt;
| x + y&lt;br /&gt;
|x plus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction&lt;br /&gt;
| -&lt;br /&gt;
| x - y&lt;br /&gt;
|x minus y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication&lt;br /&gt;
| *&lt;br /&gt;
| x * y&lt;br /&gt;
|x multiplied by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division&lt;br /&gt;
| /&lt;br /&gt;
| x / y&lt;br /&gt;
|x divided by y&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder&lt;br /&gt;
| %&lt;br /&gt;
| x % y&lt;br /&gt;
|the remainder from: x divided by y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 100 + 100; // 200&lt;br /&gt;
local w = 0 - 2;     // -2&lt;br /&gt;
local x = 5.5 * 100; // 550.0&lt;br /&gt;
local y = 20 / 2;    // 10&lt;br /&gt;
local z = 23 % 2;    // 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The addition operators &amp;lt;code&amp;gt;&#039;&#039;&#039;+&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;+=&#039;&#039;&#039;&amp;lt;/code&amp;gt; are also able to handle string operands. If one operand is a string, Squirrel will try to convert the other operand to a string as well.&lt;br /&gt;
This same type conversion happens between floats and integers for any arithmetic operator (not just addition). If one operand is a float and the other an integer, the resulting value will be a float.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local str1 = &amp;quot;Hello,&amp;quot;;&lt;br /&gt;
local str2 = &amp;quot; World!&amp;quot;;&lt;br /&gt;
str1 += str2; // Hello World!&lt;br /&gt;
// See next section for +=&lt;br /&gt;
&lt;br /&gt;
local float = 10 - 7.0 // 3.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Assignment&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Assignment&lt;br /&gt;
| =&lt;br /&gt;
| x = y&lt;br /&gt;
|assign value y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Addition Assignment&lt;br /&gt;
| +=&lt;br /&gt;
| x += y&lt;br /&gt;
|assign x + y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Subtraction Assignment&lt;br /&gt;
| -=&lt;br /&gt;
| x -= y&lt;br /&gt;
|assign x - y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Multiplication Assignment&lt;br /&gt;
| *=&lt;br /&gt;
| x *= y&lt;br /&gt;
|assign x * y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Division Assignment&lt;br /&gt;
| /=&lt;br /&gt;
| x /= y&lt;br /&gt;
|assign x / y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Remainder Assignment&lt;br /&gt;
| %=&lt;br /&gt;
| x %= y&lt;br /&gt;
|assign x % y to variable x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 100;&lt;br /&gt;
x += 5;   // equivalent to: x = x + 5&lt;br /&gt;
x -= 5;   // 100&lt;br /&gt;
x *= 100; // 10,000&lt;br /&gt;
x /= 2;   // 5,000&lt;br /&gt;
x %= 2;   // 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Increment/Decrement&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-increment&lt;br /&gt;
| ++&lt;br /&gt;
| ++x&lt;br /&gt;
|increment x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-increment&lt;br /&gt;
| ++&lt;br /&gt;
| x++&lt;br /&gt;
|copy x, increment variable x by 1, then return the copy&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Pre-decrement&lt;br /&gt;
| --&lt;br /&gt;
| --x&lt;br /&gt;
|decrement x by 1, then return x&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Post-decrement&lt;br /&gt;
| --&lt;br /&gt;
| x--&lt;br /&gt;
|copy x, decrement variable x by 1, then return the copy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 1;&lt;br /&gt;
local y;&lt;br /&gt;
&lt;br /&gt;
y = x++; // y = 1, it got the value of x and then x got incremented, x = 2&lt;br /&gt;
y = ++x; // y = 3, x got incremented and then y got x&#039;s value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Relational&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Equality&lt;br /&gt;
| ==&lt;br /&gt;
| x == y&lt;br /&gt;
|true if x equals y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Inequality&lt;br /&gt;
| !=&lt;br /&gt;
| x != y&lt;br /&gt;
|true if x does not equal y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than&lt;br /&gt;
| &amp;lt;&lt;br /&gt;
| x &amp;lt; y&lt;br /&gt;
|true if x is less than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than&lt;br /&gt;
| &amp;gt;&lt;br /&gt;
| x &amp;gt; y&lt;br /&gt;
|true if x is greater than y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Less than or equal to&lt;br /&gt;
| &amp;lt;=&lt;br /&gt;
| x &amp;lt;= y&lt;br /&gt;
|true if x is less than or equal to y, false otherwise&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Greater than or equal to&lt;br /&gt;
| &amp;gt;=&lt;br /&gt;
| x &amp;gt;= y&lt;br /&gt;
|true if x is greater than or equal to y, false otherwise&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local x = 5;&lt;br /&gt;
local y = 5;&lt;br /&gt;
local z;&lt;br /&gt;
&lt;br /&gt;
z = x == y; // true&lt;br /&gt;
z = x != y; // false&lt;br /&gt;
z = x &amp;gt; y;  // false&lt;br /&gt;
z = x &amp;gt;= y; // true&lt;br /&gt;
z = x &amp;lt; y;  // false&lt;br /&gt;
z = x &amp;lt;= y; // true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Logical&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; margin:auto; text-align:center font-weight:bold; font-size:110%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Operator&lt;br /&gt;
!Symbol&lt;br /&gt;
!Form&lt;br /&gt;
!Operation&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical NOT&lt;br /&gt;
| !&lt;br /&gt;
| !x&lt;br /&gt;
|true if x evaluates to false, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical AND&lt;br /&gt;
| &amp;amp;&amp;amp;&lt;br /&gt;
| x &amp;amp;&amp;amp; y&lt;br /&gt;
|true if both operands evaluate to true, otherwise false&lt;br /&gt;
|- style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|Logical OR&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| x &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; y&lt;br /&gt;
|true if either operand evaluates to true, otherwise false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For most purposes the above definitions for AND &amp;amp; OR are sufficient, however Squirrel does not simply return boolean true or false for these operators, rather it returns a specific operand passed to the operator based on the result.&lt;br /&gt;
&lt;br /&gt;
Logical AND, if either operand evaluates to false, will return the &#039;&#039;&#039;first&#039;&#039;&#039; operand that evaluates to false. Otherwise if both evaluate true the operator will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
Logical OR will return the first operand that evaluates to true, if none do, it will return the &#039;&#039;&#039;last&#039;&#039;&#039; operand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certain values evaluate to false, these are: &amp;lt;code&amp;gt;&#039;&#039;&#039;false, null, 0, 0.0&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Everything else evaluates to true.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot; style=&amp;quot;font-weight:bold;&amp;gt;&lt;br /&gt;
local v = 0 &amp;amp;&amp;amp; 1;         // 0&lt;br /&gt;
local w = null || &amp;quot;bark&amp;quot;; // &amp;quot;bark&amp;quot;&lt;br /&gt;
local x = &amp;quot;&amp;quot; || true;     // &amp;quot;&amp;quot;&lt;br /&gt;
local y = !0;             // true&lt;br /&gt;
local z = 5 &amp;amp;&amp;amp; &amp;quot;0&amp;quot;        // &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Bitwise&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;, |, ^, ~, &amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Other Operators&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in, instanceof, typeof, comma, ternary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%&amp;quot;&amp;gt;&#039;&#039;&#039;Operator Precedence&#039;&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-, ~, !, typeof , ++, -- 	highest&lt;br /&gt;
/, *, % 	…&lt;br /&gt;
+, - 	 &lt;br /&gt;
&amp;lt;&amp;lt;, &amp;gt;&amp;gt;, &amp;gt;&amp;gt;&amp;gt; 	 &lt;br /&gt;
&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, instanceof 	 &lt;br /&gt;
==, !=, &amp;lt;=&amp;gt; 	 &lt;br /&gt;
&amp;amp; 	 &lt;br /&gt;
^ 	 &lt;br /&gt;
&amp;amp;&amp;amp;, in 	 &lt;br /&gt;
+=, =, -=, /=, *=, %= 	…&lt;br /&gt;
, (comma operator) 	lowest&lt;br /&gt;
&lt;br /&gt;
IntegerLiteral        ::=  [1-9][0-9]* | &#039;0x&#039; [0-9A-Fa-f]+ | &#039;&#039;&#039; [.]+ &#039;&#039;&#039; | 0[0-7]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; [0-9]+&lt;br /&gt;
FloatLiteral          ::=  [0-9]+ &#039;.&#039; &#039;e&#039;|&#039;E&#039; &#039;+&#039;|&#039;-&#039; [0-9]+&lt;br /&gt;
StringLiteral         ::=  &#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;br /&gt;
VerbatimStringLiteral ::=  &#039;@&#039;&#039;&amp;quot;&#039;[.]* &#039;&amp;quot;&#039;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Metamethods&amp;diff=7466</id>
		<title>Squirrel Metamethods</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Metamethods&amp;diff=7466"/>
		<updated>2023-10-27T03:38:50Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Inheritance BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Variables BACK TO START]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Inheritance&amp;diff=7465</id>
		<title>Squirrel Inheritance</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Inheritance&amp;diff=7465"/>
		<updated>2023-10-27T03:37:52Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Classes BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Metamethods NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Classes&amp;diff=7464</id>
		<title>Squirrel Classes</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Classes&amp;diff=7464"/>
		<updated>2023-10-27T03:37:37Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Weak_References BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Inheritance NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Weak_References&amp;diff=7463</id>
		<title>Squirrel Weak References</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Weak_References&amp;diff=7463"/>
		<updated>2023-10-27T03:37:16Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Delegation BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Classes NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
	<entry>
		<id>https://sigwiki.potato.tf/index.php?title=Squirrel_Delegation&amp;diff=7462</id>
		<title>Squirrel Delegation</title>
		<link rel="alternate" type="text/html" href="https://sigwiki.potato.tf/index.php?title=Squirrel_Delegation&amp;diff=7462"/>
		<updated>2023-10-27T03:37:00Z</updated>

		<summary type="html">&lt;p&gt;Mince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align: center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Generators BACK]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/An_Introduction_to_Squirrel HOME]&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:33.333%; top: 0px; position: sticky; height: 30px; display: inline-block; text-align:center; line-height: 30px; background-color:#BBBBBB;&amp;quot;&amp;gt;[https://sigwiki.potato.tf/index.php/Squirrel_Weak_References NEXT]&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mince</name></author>
	</entry>
</feed>