###Keyword###
For...Next

###Description###
Loop based on an expression.

###Syntax###
<b>For</b> &lt;variable&gt; = &lt;start&gt; <b>To</b> &lt;stop&gt; [<b>Step</b> &lt;stepval&gt;]
	<i>statements</i>
	...
<b>Next</b>


###Parameters###
@@ParamTable@@
variable
	The variable used for the count.
start
	The initial numeric value of the variable.
stop
	The final numeric value of the variable.
stepval
	[optional] The numeric value (possibly fractional) that the count is increased by each loop.  Default is 1.
@@End@@


###Remarks###
The Variable will be created automatically with a LOCAL scope, even when MustDeclareVars is on.

For...Next statements may be nested.  The For loop terminates when the value of <i>variable</i> exceeds the <i>stop</i> threshold.  If <i>stepVal</i> or <i>stop</i> is a variable, its value is only read the first time the loop executes.

A For loop will execute zero times if:
   <i>start</i> &gt; <i>stop</i> and <i>step</i> <u>&gt;</u> 0, or
   <i>start</i> &lt; <i>stop</i> and <i>step</i> is negative


###Related###
<a href="ContinueLoop.htm">ContinueLoop</a>, <a href="ExitLoop.htm">ExitLoop</a>


###Example###
@@IncludeExample@@
