For Next: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:


The '''loop body''' may consist of ''zero'' or more statements. However, the use of at least one statement in the loop body is encouraged for clarity.
The '''loop body''' may consist of ''zero'' or more statements. However, the use of at least one statement in the loop body is encouraged for clarity.
<noinclude>
[[Category:Control Structures]]
</noinclude>

Revision as of 19:08, 9 February 2012

FOR counter = initial_value to final_value [STEP step_value]
   [loop body]
NEXT counter

A FOR LOOP allows you to specify that an application should repeat a statement or set of statements until a counter reaches some its final value.

The loop body may consist of zero or more statements. However, the use of at least one statement in the loop body is encouraged for clarity.