NEXT

Top  Previous  Next

Action

Ends a FOR..NEXT structure.

 

 

Syntax

NEXT [var]

 

 

Remarks

Var

The index variable that is used as a counter when you form the  structure with FOR var. Var is optional and not needed.

 

You must end each FOR statement with a NEXT statement.

 

See also

FOR

 

 

Example

Dim X As Byte , Y As Byte , A As Byte

Y = 10                                   'make y 10

For A = 1 To 10                           'do this 10 times

For X = Y To 1                           'this one also

Print X ; A                             'print the values

Next                                   'next x (count down)

Next A                                   'next a (count up) END