ON - source-solutions/HELP GitHub Wiki

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.
⚠️ **GitHub.com Fallback** ⚠️