Next (statement): Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
The '''Next''' (N) [[statement]] works in conjunction with the [[For]] statement to form a loop. NEXT calculates the next numeric variable and runs a loop test to determine whether or not execution of the loop should continue.
The '''Next''' (N) [[statement]] works in conjunction with the [[For]] statement to form a loop. NEXT calculates the next numeric variable and runs a loop test to determine whether or not execution of the loop should continue.


For disambiguation purposes, see also [[Next (internal function]].
For disambiguation purposes, see also [[Next (internal function)]].


===Comments and Examples===
===Comments and Examples===

Latest revision as of 18:02, 23 September 2014

The Next (N) statement works in conjunction with the For statement to form a loop. NEXT calculates the next numeric variable and runs a loop test to determine whether or not execution of the loop should continue.

For disambiguation purposes, see also Next (internal function).

Comments and Examples

If the value of the numeric variable remains within the specified boundaries (as indicated in the For statement), the loop is re-executed. If it is not within the specified boundaries, control passes to the first executable statement after Next.

Used in conjunction with the UDIM internal function, a FOR/NEXT loop can be used to perform an action to each part of an array (in this case checking for selected check boxes:

00390     For I=1 to UDIM(box$)
00400         if box$(I)(1:1)="^" then ordered(I)=1 else ordered(I)=0
00410     next I

Syntax

NEXT <numeric variable>

Parameter

"Numeric variable" must be the same numeric variable that is listed in the corresponding For statement.