<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Conditional_statements</id>
		<title>Conditional statements - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Conditional_statements"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;action=history"/>
		<updated>2026-07-11T08:08:38Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=4454&amp;oldid=prev</id>
		<title>AfterLifeLochie: Ported to to Tutorial template</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=4454&amp;oldid=prev"/>
				<updated>2012-12-01T13:25:09Z</updated>
		
		<summary type="html">&lt;p&gt;Ported to to Tutorial template&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 13:25, 1 December 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&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='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;This is a tutorial will teach you how to make your script react to different situations.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;{{Tutorial&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;|name=Conditional Statements&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;|desc=&lt;/ins&gt;This is a tutorial will teach you how to make your script react to different situations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;|objective=To gain a basic understanding of programming in ComputerCraft.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;|prereqs=[[Variables|A basic understanding of Variables]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The If statement ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The If statement ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>AfterLifeLochie</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=3583&amp;oldid=prev</id>
		<title>78.131.71.35: /* The ElseIf statement */</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=3583&amp;oldid=prev"/>
				<updated>2012-11-02T10:52:52Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The ElseIf statement&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:52, 2 November 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 141:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 141:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; local Num1, Num2, Num3 = 1,2,3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; local Num1, Num2, Num3 = 1,2,3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160; --&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Without &lt;/del&gt;elseif&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160; --&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;With &lt;/ins&gt;elseif&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; if Num1&amp;gt;Num2 then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; if Num1&amp;gt;Num2 then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  write(&amp;quot;First condition passed!\n&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  write(&amp;quot;First condition passed!\n&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>78.131.71.35</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=3447&amp;oldid=prev</id>
		<title>74.58.83.183: /* Available conditions */  Missing words.</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=3447&amp;oldid=prev"/>
				<updated>2012-10-18T17:20:42Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Available conditions: &lt;/span&gt;  Missing words.&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:20, 18 October 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Available conditions ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Available conditions ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;There are a number of different conditions that can be used to make the &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;There are a number of different conditions that can be used to make the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;conditional statement.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;Is equal to&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;Is equal to&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>74.58.83.183</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=3244&amp;oldid=prev</id>
		<title>122.60.16.116: /* The If statement */</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=3244&amp;oldid=prev"/>
				<updated>2012-09-30T23:53:35Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The If statement&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 23:53, 30 September 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The If statement ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The If statement ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;Conditional statements are one of the fundamental building blocks for any coding &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;languages&lt;/del&gt;. They are just as they sound, if a condition is met then a block of code will run. The simplest form of conditional statement available in Lua is the &amp;quot;If&amp;quot; statement, which indicates that if one or more conditions are met, the following block of code will run. If statements take the following format&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;Conditional statements are one of the fundamental building blocks for any coding &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;language&lt;/ins&gt;. They are just as they sound, if a condition is met then a block of code will run. The simplest form of conditional statement available in Lua is the &amp;quot;If&amp;quot; statement, which indicates that if one or more conditions are met, the following block of code will run. If statements take the following format&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; local Variable = 1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; local Variable = 1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; if Variable==1 then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; if Variable==1 then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>122.60.16.116</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=1724&amp;oldid=prev</id>
		<title>My hat stinks: /* The If statement */</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=1724&amp;oldid=prev"/>
				<updated>2012-06-01T23:44:39Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The If statement&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 23:44, 1 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;Lua determines whether an if statement passes by using the boolean values returned by the condition, so it would be possible but unnecessary to enter a boolean as the condition &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as follows&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;Lua determines whether an if statement passes by using the boolean values returned by the condition, so it would be possible &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(&lt;/ins&gt;but unnecessary&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) &lt;/ins&gt;to enter a boolean as the condition&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160; if true then write(&amp;quot;This will always write!\n&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160; if true then write(&amp;quot;This will always write!\n&amp;quot;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160; if false then write(&amp;quot;This will never write!\n&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160; if false then write(&amp;quot;This will never write!\n&amp;quot;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Available conditions ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Available conditions ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>My hat stinks</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=1573&amp;oldid=prev</id>
		<title>My hat stinks at 18:48, 19 May 2012</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=1573&amp;oldid=prev"/>
				<updated>2012-05-19T18:48:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:48, 19 May 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&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 colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;[[Category:Tutorials]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a tutorial will teach you how to make your script react to different situations.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a tutorial will teach you how to make your script react to different situations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ccraft_wiki-mw_:diff:version:1.11a:oldid:1572:newid:1573 --&gt;
&lt;/table&gt;</summary>
		<author><name>My hat stinks</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=1572&amp;oldid=prev</id>
		<title>My hat stinks: Created page with &quot;This is a tutorial will teach you how to make your script react to different situations.  == The If statement ==  Conditional statements are one of the fundamental building bl...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Conditional_statements&amp;diff=1572&amp;oldid=prev"/>
				<updated>2012-05-19T18:47:01Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;This is a tutorial will teach you how to make your script react to different situations.  == The If statement ==  Conditional statements are one of the fundamental building bl...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a tutorial will teach you how to make your script react to different situations.&lt;br /&gt;
&lt;br /&gt;
== The If statement ==&lt;br /&gt;
&lt;br /&gt;
Conditional statements are one of the fundamental building blocks for any coding languages. They are just as they sound, if a condition is met then a block of code will run. The simplest form of conditional statement available in Lua is the &amp;quot;If&amp;quot; statement, which indicates that if one or more conditions are met, the following block of code will run. If statements take the following format&lt;br /&gt;
  local Variable = 1&lt;br /&gt;
  if Variable==1 then&lt;br /&gt;
    write(&amp;quot;The variable is 1!\n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
  if Variable==2 then&lt;br /&gt;
    write(&amp;quot;The variable is 2!\n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
This script will simply output the text &amp;quot;The variable is 1!&amp;quot;. The &amp;quot;==&amp;quot; operator simply means &amp;quot;is equal to&amp;quot;, so the line reads along the lines of &amp;quot;If Variable is equal to 1, then do this&amp;quot;. &amp;quot;end&amp;quot; marks the end of the code block, and anything after it is run normally regardless of whether the conditions were met.&lt;br /&gt;
&lt;br /&gt;
Brackets may optionally be used around conditions, although it is not necessary unless you want to control the order of a calculation.&lt;br /&gt;
&lt;br /&gt;
Note that since lua disregards new lines, it would be equally acceptable to write the following&lt;br /&gt;
 if Variable==1 then write(&amp;quot;The variable is 1!\n&amp;quot;) end&lt;br /&gt;
However, this method is generally less readable and not commonly used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lua determines whether an if statement passes by using the boolean values returned by the condition, so it would be possible but unnecessary to enter a boolean as the condition as follows&lt;br /&gt;
 if true then write(&amp;quot;This will always write!\n&amp;quot;)&lt;br /&gt;
 if false then write(&amp;quot;This will never write!\n&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Available conditions ==&lt;br /&gt;
There are a number of different conditions that can be used to make the &lt;br /&gt;
&lt;br /&gt;
;Is equal to&lt;br /&gt;
  if Variable == Variable2 then&lt;br /&gt;
    --Do stuff&lt;br /&gt;
  end&lt;br /&gt;
The &amp;quot;==&amp;quot; condition is the most basic operator, simply comparing two values to see if they are the same. If both values are the same, the condition is met and the if statement passes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Is not equal to&lt;br /&gt;
  if Variable ~= Variable2 then&lt;br /&gt;
    --Do stuff&lt;br /&gt;
  end&lt;br /&gt;
The &amp;quot;~=&amp;quot; condition compares two values to see if they are the same, and if they are ''not'' the same, the condition is met and the if statement passes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Greater than&lt;br /&gt;
  if Number &amp;gt; Number2 then&lt;br /&gt;
    --Do stuff&lt;br /&gt;
  end&lt;br /&gt;
The &amp;quot;&amp;gt;&amp;quot; condition compares two number values, and if the first is greater than the second, the condition is met and the if statement passes. The &amp;quot;&amp;gt;=&amp;quot; (Greater than or equal to) operator acts as both the &amp;quot;greater than&amp;quot; and the &amp;quot;equal to&amp;quot; conditions, meaning the condition is met if either the first number is equal to the second, or the first number is greater than the second.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Less than&lt;br /&gt;
  if Number &amp;lt; Number2 then&lt;br /&gt;
    --Do stuff&lt;br /&gt;
  end&lt;br /&gt;
The &amp;quot;&amp;lt;&amp;quot; condition compares two number values, and if the first is lower than the second, the condition is met and the if statement passes. The &amp;quot;&amp;lt;=&amp;quot; (Less than or equal to) operator acts as a combination of the &amp;quot;less than&amp;quot; and the &amp;quot;equal to&amp;quot; conditions.&lt;br /&gt;
&lt;br /&gt;
=== And, Or, Not ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it is desirable to combine conditions. Although it is possible to use multiple if statements, or ifs inside ifs, it is a best practice to use &amp;quot;and&amp;quot; and &amp;quot;or&amp;quot; if possible.&lt;br /&gt;
&lt;br /&gt;
;And&lt;br /&gt;
 local Num1,Num2,Num3 = 1,2,3&lt;br /&gt;
 &lt;br /&gt;
 --Multiple if&lt;br /&gt;
 if Num1 &amp;gt; Num2 then&lt;br /&gt;
   if Num2 &amp;lt; Num3 then&lt;br /&gt;
     write(&amp;quot;Condition is true!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 --Using And&lt;br /&gt;
 if (Num1&amp;gt;Num2) and (Num2&amp;lt;Num3) then&lt;br /&gt;
   write(&amp;quot;Condition is true!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;and&amp;quot; operator means that both conditions must match before the statement passes. If either side fails, the whole condition is false. Note that if the left side fails, the right side is ignored, so if you have a critical function it should be on the left of the &amp;quot;and&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
;Or&lt;br /&gt;
 local Num1,Num2,Num3 = 1,2,3&lt;br /&gt;
 &lt;br /&gt;
 --Multiple if&lt;br /&gt;
 if Num1 &amp;gt; Num2 then&lt;br /&gt;
   write(&amp;quot;Condition is true!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
 if Num2 &amp;lt; Num3 then&lt;br /&gt;
   write(&amp;quot;Condition is true!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 --Using Or&lt;br /&gt;
 if (Num1&amp;gt;Num2) or (Num2&amp;lt;Num3) then&lt;br /&gt;
   write(&amp;quot;Condition is true!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;or&amp;quot; operator means that if either condition matches the statement passes. This means that if either the left side, the right side, or both pass, the statement is true. Note that if the left side passes, the right side is ignored, so if you have a critical function it should be on the left of the &amp;quot;or&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
;Not&lt;br /&gt;
 local Num1,Num2,Num3 = 1,2,3&lt;br /&gt;
 &lt;br /&gt;
 if (Num1 &amp;lt; Num2) and not (Num1 &amp;gt; Num3) then&lt;br /&gt;
   write(&amp;quot;Condition is true!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
While the &amp;quot;not&amp;quot; statement is rarely a necessity, it can be used to reverse a value from &amp;quot;true&amp;quot; to &amp;quot;false&amp;quot; or vice versa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some situations, it may be preferable not to use these statements as code will run before the second condition needs to be assessed, such as as follows&lt;br /&gt;
 local Num1,Num2 = 1,2&lt;br /&gt;
 &lt;br /&gt;
 --And should not be used here&lt;br /&gt;
 if Num1&amp;gt;Num2 then&lt;br /&gt;
   local Num3 = 3&lt;br /&gt;
   &lt;br /&gt;
   if Num3&amp;gt;Num2 then write(&amp;quot;Text!\n&amp;quot;) end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== The Else statement ==&lt;br /&gt;
&lt;br /&gt;
It is common that you may want to run some code on the failure of the condition. If this is the case, it may be achieved through the use of two separate if statements, but it's simpler to use the &amp;quot;else&amp;quot; statement.&lt;br /&gt;
  local Num1 = 1&lt;br /&gt;
  local Num2 = 2&lt;br /&gt;
  &lt;br /&gt;
  --Using multiple if&lt;br /&gt;
  if Num1 &amp;gt; Num2 then&lt;br /&gt;
    write(&amp;quot;Number 1 is greater!\n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
  if Num1 &amp;lt;= Num2 then&lt;br /&gt;
    write(&amp;quot;Number 1 is not greater!\n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  --Using else&lt;br /&gt;
  if Num1&amp;gt;Num2 then&lt;br /&gt;
    write(&amp;quot;Number 1 is greater!\n&amp;quot;)&lt;br /&gt;
  else&lt;br /&gt;
    write(&amp;quot;Number 1 is not greater!\n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== The ElseIf statement ==&lt;br /&gt;
&lt;br /&gt;
Sometimes it may be desirable to run the &amp;quot;else&amp;quot; code only under certain conditions. This is where &amp;quot;elseif&amp;quot; becomes useful. It acts as if it is another if statement, but also functions as the &amp;quot;else&amp;quot; of the if it's in.&lt;br /&gt;
&lt;br /&gt;
 local Num1, Num2, Num3 = 1,2,3&lt;br /&gt;
 &lt;br /&gt;
 --Without elseif&lt;br /&gt;
 if Num1&amp;gt;Num2 then&lt;br /&gt;
   write(&amp;quot;First condition passed!\n&amp;quot;)&lt;br /&gt;
 elseif Num3&amp;gt;Num2 then&lt;br /&gt;
   write(&amp;quot;First condition failed, second condition passed!\n&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;elseif&amp;quot; statement can become even more useful if you chain together more &amp;quot;elseif&amp;quot;s and &amp;quot;else&amp;quot;s with it, but remember that the first if that passes will break the chain!&lt;br /&gt;
 if Bool then&lt;br /&gt;
   --Stuff&lt;br /&gt;
 elseif Var1 == Var2 then&lt;br /&gt;
   --Other stuff&lt;br /&gt;
 elseif Table[1] then&lt;br /&gt;
   --More stuff&lt;br /&gt;
 else&lt;br /&gt;
   --More again!&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>My hat stinks</name></author>	</entry>

	</feed>