For Next: Difference between revisions

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


  FOR counter = initial_value to final_value
  FOR counter = initial_value to final_value [STEP step_value]
     [loop body]
     [loop body]
  NEXT
  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.

Revision as of 16:29, 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.