Q(uick)BASIC Keyword: NEXT

Quick View

NEXT Keyword

Different Uses

Worth knowing

Useful and cross-version information about the programming environments of QBasic and QuickBasic.

Description/Parameter(s)

Increments and tests the counter in a FOR...NEXT loop or, when used with RESUME, continues execution from an error-trapping handler.

Description/Parameter(s)
Syntax 1
NEXT [loopvar] The terminating line of a FOR...NEXT structure. Should include the name of the loop control variable for readability, but is not required to.
Syntax 2
RESUME NEXT Returns control from an error-handling routine to the statement following the one that caused the error.
Description/Parameter(s)
Syntax 1
NEXT [counter [,counter…]] The terminating line of a FOR...NEXT structure. Should include the name of the loop counter for readability, but is not required to.
Syntax 2
RESUME NEXT Returns control from an error-handling subroutine to the statement following the one that caused the error.