<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hlkitwiki.wolflair.com//index.php?action=history&amp;feed=atom&amp;title=Declaring_Variables</id>
	<title>Declaring Variables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hlkitwiki.wolflair.com//index.php?action=history&amp;feed=atom&amp;title=Declaring_Variables"/>
	<link rel="alternate" type="text/html" href="https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;action=history"/>
	<updated>2026-05-05T15:42:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=1267&amp;oldid=prev</id>
		<title>Rob at 11:28, 4 December 2008</title>
		<link rel="alternate" type="text/html" href="https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=1267&amp;oldid=prev"/>
		<updated>2008-12-04T11:28:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:28, 4 December 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{context|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Basic Concepts and Terminology|Scripting Language|Language Basics&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{context|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Kit Reference&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variables can be declared to store data for subsequent use within the script. Variables have the same naming rules as unique ids: maximum of 10 characters, limited to alphanumeric characters and the underscore, and cannot start with a digit.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variables can be declared to store data for subsequent use within the script. Variables have the same naming rules as unique ids: maximum of 10 characters, limited to alphanumeric characters and the underscore, and cannot start with a digit.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=616&amp;oldid=prev</id>
		<title>Rob at 08:31, 22 November 2008</title>
		<link rel="alternate" type="text/html" href="https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=616&amp;oldid=prev"/>
		<updated>2008-11-22T08:31:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:31, 22 November 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:&lt;/del&gt;Basic Concepts and Terminology&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{context|&lt;/ins&gt;Basic Concepts and Terminology|Scripting Language&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|&lt;/ins&gt;Language Basics&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[Context: [[Home&lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HL Kit]] &amp;amp;#133; [[Basic Concepts and Terminology]] &amp;amp;#133; [[&lt;/del&gt;Scripting Language&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &amp;amp;#133; [[&lt;/del&gt;Language Basics&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variables can be declared to store data for subsequent use within the script. Variables have the same naming rules as unique ids: maximum of 10 characters, limited to alphanumeric characters and the underscore, and cannot start with a digit.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variables can be declared to store data for subsequent use within the script. Variables have the same naming rules as unique ids: maximum of 10 characters, limited to alphanumeric characters and the underscore, and cannot start with a digit.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=263&amp;oldid=prev</id>
		<title>Rob at 09:03, 18 November 2008</title>
		<link rel="alternate" type="text/html" href="https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=263&amp;oldid=prev"/>
		<updated>2008-11-18T09:03:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:03, 18 November 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Basic Concepts and Terminology]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Basic Concepts and Terminology]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[Context: [[Home|HL Kit]] &amp;amp;#133; [[Basic Concepts and Terminology]] &amp;amp;#133; [[Scripting Language]]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[Context: [[Home|HL Kit]] &amp;amp;#133; [[Basic Concepts and Terminology]] &amp;amp;#133; [[Scripting Language&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &amp;amp;#133; [[Language Basics&lt;/ins&gt;]]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variables can be declared to store data for subsequent use within the script. Variables have the same naming rules as unique ids: maximum of 10 characters, limited to alphanumeric characters and the underscore, and cannot start with a digit.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variables can be declared to store data for subsequent use within the script. Variables have the same naming rules as unique ids: maximum of 10 characters, limited to alphanumeric characters and the underscore, and cannot start with a digit.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=245&amp;oldid=prev</id>
		<title>Rob: New page: Category:Basic Concepts and Terminology [Context: HL Kit &amp;#133; Basic Concepts and Terminology &amp;#133; Scripting Language]  Variables can be declared to store data for ...</title>
		<link rel="alternate" type="text/html" href="https://hlkitwiki.wolflair.com//index.php?title=Declaring_Variables&amp;diff=245&amp;oldid=prev"/>
		<updated>2008-11-18T03:23:44Z</updated>

		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/index.php?title=Category:Basic_Concepts_and_Terminology&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Basic Concepts and Terminology (page does not exist)&quot;&gt;Category:Basic Concepts and Terminology&lt;/a&gt; [Context: &lt;a href=&quot;/index.php?title=Home&quot; title=&quot;Home&quot;&gt;HL Kit&lt;/a&gt; � &lt;a href=&quot;/index.php?title=Basic_Concepts_and_Terminology&quot; title=&quot;Basic Concepts and Terminology&quot;&gt;Basic Concepts and Terminology&lt;/a&gt; � &lt;a href=&quot;/index.php?title=Scripting_Language&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Scripting Language (page does not exist)&quot;&gt;Scripting Language&lt;/a&gt;]  Variables can be declared to store data for ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Basic Concepts and Terminology]]&lt;br /&gt;
[Context: [[Home|HL Kit]] &amp;amp;#133; [[Basic Concepts and Terminology]] &amp;amp;#133; [[Scripting Language]]]&lt;br /&gt;
&lt;br /&gt;
Variables can be declared to store data for subsequent use within the script. Variables have the same naming rules as unique ids: maximum of 10 characters, limited to alphanumeric characters and the underscore, and cannot start with a digit.&lt;br /&gt;
&lt;br /&gt;
Variables can be either a number (tracked as a floating point value internally) or a string of text. String variables have a maximum size limitation of 5000 characters, which should be more than adequate for any practical purpose.&lt;br /&gt;
&lt;br /&gt;
Variables are declared with the syntax &amp;quot;var name as type&amp;quot;, where &amp;quot;name&amp;quot; is the variable name to declare and &amp;quot;type&amp;quot; is the variable type. Valid values for the type are: &amp;quot;string&amp;quot; for strings and &amp;quot;number&amp;quot; for numeric values.&lt;br /&gt;
&lt;br /&gt;
Examples of legal variable declarations are shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var temp as number&lt;br /&gt;
var Word as string&lt;br /&gt;
var IN_CAPS as number&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples of illegal or unwise variable declarations are shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var name_too_long as number (over 10 character limit)&lt;br /&gt;
var one.two as string (illegal character used)&lt;br /&gt;
var 123456x as number (legal but unwise - starts with a digit)&lt;br /&gt;
var NUMBER as number (legal but unwise - don&amp;#039;t rely on case to distinguish)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within a script, variables are simply referenced using their name. Once a specific variable is declared to be of a particular type, it cannot be declared as another type. However, it is valid for the variable &amp;quot;foo&amp;quot; to be declared multiple times with the same type, as long as subsequent declarations are of the same type. If the variable already exists with the same type, the new declaration is simply ignored. This means that the following code is perfectly legal (though redundant):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var foo as number&lt;br /&gt;
var foo as number&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the next block of code is not legal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var foo as number&lt;br /&gt;
var foo as string&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every time a script is evaluated, it starts with a &amp;quot;clean slate&amp;quot;. Therefore, values of variables do not persist from one invocation to the next. Once a variable is declared, it is initialized with a default value. For numeric variables, the default value is zero. For strings, the default value is an empty string (&amp;quot;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Variables can be declared at any time within a script. The only requirement is that a variable must be declared before it is actually used. It is perfectly valid to declare a variable immediately before it is first used.&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
</feed>