Skip to content
Andrew Owen edited this page May 25, 2023 · 1 revision

ON


ON n {GOTO|GOSUB} line_number_0 [, line_number_1] ...

Jumps to the nth line number specified in the list. If n is 0 or greater than the number of line numbers in the list, no jump is performed. If GOTO is specified, the jump is unconditional; if GOSUB is specified, jumps to a subroutine.

Parameters

  • n is a numeric expression in [0 to 255].
  • line_number_0, line_number_1, ... are existing line numbers in the program.

Errors

  • n has a string value: Type mismatch.
  • n is not in [-32768 to 32767], Overflow.
  • n is not in [0 to 255]: Illegal function call.
  • The line number jumped to does not exist: Undefined line number.

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