Next (statement): Difference between revisions
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. | 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. | ||
===Comments and Examples=== | ===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. | 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=== | ===Syntax=== |
Revision as of 19:01, 23 July 2013
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.
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
Parameter
"Numeric variable" must be the same numeric variable that is listed in the corresponding For statement.