<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3AEnd</id>
	<title>TI-BASIC:End - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3AEnd"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:End&amp;action=history"/>
	<updated>2026-04-17T12:30:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:End&amp;diff=1039&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:End&amp;diff=1039&amp;oldid=prev"/>
		<updated>2016-02-24T18:31:31Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Command&lt;br /&gt;
|picture=for/FOR_ANIMATED.gif&lt;br /&gt;
|summary=Indicates the end of a block of statements.&lt;br /&gt;
|syntax=If &amp;#039;&amp;#039;condition&amp;#039;&amp;#039;&lt;br /&gt;
Then&lt;br /&gt;
&amp;#039;&amp;#039;statement(s)&amp;#039;&amp;#039;&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
While &amp;#039;&amp;#039;condition&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;statement(s)&amp;#039;&amp;#039;&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
Repeat &amp;#039;&amp;#039;condition&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;statement(s)&amp;#039;&amp;#039;&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
For(&amp;#039;&amp;#039;variable&amp;#039;&amp;#039;,&amp;#039;&amp;#039;start&amp;#039;&amp;#039;,&amp;#039;&amp;#039;end&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;step&amp;#039;&amp;#039;])&lt;br /&gt;
&amp;#039;&amp;#039;statement(s)&amp;#039;&amp;#039;&lt;br /&gt;
End&lt;br /&gt;
|location=While editing a program, press:&lt;br /&gt;
# PRGM to enter the PRGM menu&lt;br /&gt;
# 7 to choose End, or use arrows&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|size=1 byte&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The End command is used together with the different control structures, including the [[TI-BASIC:If|If]] conditional, [[TI-BASIC:While|While]] loop, [[TI-BASIC:Repeat|Repeat]] loop, and [[TI-BASIC:For|For(]] loop, to indicate the &amp;#039;&amp;#039;end&amp;#039;&amp;#039; of the code block for the respective control structure. In the case of the If conditional, you also need to add a [[TI-BASIC:If|Then]] command, which is used to indicate the beginning of the control structure.&lt;br /&gt;
&lt;br /&gt;
= Advanced Uses =&lt;br /&gt;
&lt;br /&gt;
You can prematurely end a control structure by using a lone If conditional, and then having End be its executed command. Because the calculator stores the positions of the End commands, it will take this End command to be the End command of the control structure.&lt;br /&gt;
&lt;br /&gt;
 :If &amp;lt;condition&amp;gt;&lt;br /&gt;
 :End&lt;br /&gt;
&lt;br /&gt;
One of the most important features of the End command is putting multiple control structures inside of each other (known as nesting). While you typically nest If conditionals inside of loops, you can actually nest any control structure inside of any other control structure -- this even works when using the same control structure, such as a While loop inside of another While loop.&lt;br /&gt;
&lt;br /&gt;
When nesting control structures, you need to remember to put the appropriate number of End commands to close the appropriate structure. The easiest way to keep track of lots of nested control structures is to code the first part, add an End immediately after the beginning, and then hit 2nd DEL on the line with the End, then hit ENTER a lot of times.&lt;br /&gt;
&lt;br /&gt;
= Error Conditions =&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#invalid|ERR:INVALID]]&amp;#039;&amp;#039;&amp;#039; occurs if this statement is used outside a program.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#invalid|ERR:SYNTAX]]&amp;#039;&amp;#039;&amp;#039; occurs if this statement is used before a logic block has been initiated.&lt;br /&gt;
&lt;br /&gt;
= Related Commands =&lt;br /&gt;
&lt;br /&gt;
* [[TI-BASIC:If|If]]&lt;br /&gt;
* [[TI-BASIC:Then|Then]]&lt;br /&gt;
* [[TI-BASIC:While|While]]&lt;br /&gt;
* [[TI-BASIC:Repeat|Repeat]]&lt;br /&gt;
* [[TI-BASIC:For|For(]][[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>