<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wikiti.brandonw.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wikiti.brandonw.net/index.php?action=history&amp;feed=atom&amp;title=83Plus%3ABasic%3AFor%28</id>
		<title>83Plus:Basic:For( - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wikiti.brandonw.net/index.php?action=history&amp;feed=atom&amp;title=83Plus%3ABasic%3AFor%28"/>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Basic:For(&amp;action=history"/>
		<updated>2026-04-06T00:50:02Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Basic:For(&amp;diff=3849&amp;oldid=prev</id>
		<title>Thanatos at 05:00, 8 December 2005</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Basic:For(&amp;diff=3849&amp;oldid=prev"/>
				<updated>2005-12-08T05:00:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:83Plus:Basic:Conditionals|For(]]&lt;br /&gt;
&lt;br /&gt;
==Synopsis==&lt;br /&gt;
'''Token Size:''' 1 byte&lt;br /&gt;
&lt;br /&gt;
'''Syntax:'''&lt;br /&gt;
:For(Variable,First,Last[,Increment])&lt;br /&gt;
:''commands''&lt;br /&gt;
:End&lt;br /&gt;
&lt;br /&gt;
A for loop is used to execute commands while a variable is within a certain range. A for loop starts by setting ''Variable'' to ''First'', and running the commands within it. At the end, ''Variable'' is incremented by 1 or ''Increment'', if specified. If the value of ''Variable'' is greater than ''Last'' and ''Increment'' is positive, or if the value of ''Variable'' is less than ''Last'' and ''Increment'' is negative, the for loop will stop, and execution will continue after the ''End'' statement. Otherwise the commands in the for loop are executed with the new value of ''Variable''.&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;br /&gt;
The value of ''Variable'' may be modified during the for loop, and will have the expected results.&lt;br /&gt;
''Increment'' may be negative. It cannot be zero.&lt;br /&gt;
&lt;br /&gt;
Note that a for loop is essentially a while loop.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;For(X,1,10)&lt;br /&gt;
Disp X&lt;br /&gt;
End&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
could be written as:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;1-&amp;gt;X&lt;br /&gt;
While X&amp;lt;=10&lt;br /&gt;
Disp X&lt;br /&gt;
X+1-&amp;gt;X&lt;br /&gt;
End&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use of a Goto statement within a for loop will cause an increase in memory allocation, leading to program slowdowns and eventually a MEMORY error. For example, the following code will eventually cause an error:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Lbl A&lt;br /&gt;
For(X,1,10)&lt;br /&gt;
Goto A&lt;br /&gt;
End&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
A for loop is good for looping through a certain range of numbers:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;For(X,1,10)&lt;br /&gt;
Disp X&lt;br /&gt;
End&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Thanatos</name></author>	</entry>

	</feed>