Skip to content
Andrew Owen edited this page May 30, 2023 · 2 revisions

NEXT


NEXT [var_0 [, var_1] ...]

Iterates a FOR to NEXT loop: increments the loop variable and jumps to the FOR statement. If no variables are specified, next matches the most recent FOR statement. Several nested NEXT statements can be consolidated into one by using the variable list. If one or more variables are specified, their order must match the order of earlier FOR statements.

Parameters

var_0, var_1, ... are numeric variables which are loop counters in a FOR statement.

Errors

  • No FOR statement is found to match the NEXT statement and variables: NEXT without FOR.
  • var_0, var_1, ... are string variables: NEXT without FOR.
  • The (implicit or explicit) loop variable is an integer variable and is taken outside the range [-32768, 32767] when incremented after the final iteration: Overflow.

Welcome to the SE BASIC wiki


  • Press RETURN to return to this menu.
  • Enter the name of a TOPIC to display it.
  • Enter EXIT to return to BASIC.

Choose from the following topics:

  1. Quick start guide: QUICK
  2. User's guide: USER
  3. Configuration guide: CONFIG
  4. Language guide: LANGUAGE
  5. Language reference: BASIC
  6. Technical reference: TECH
  7. Developer's guide: DEV
  8. Acknowledgemets: CREDITS
  9. Licenses: LICENSE
Clone this wiki locally