qb45advr.hlp (Topic list)
ON...GOSUB, ON...GOTO Statements QuickSCREEN
  QuickSCREEN      Details      Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
ON...GOSUB and ON...GOTO - control flow statements that branches to
                           one of several specified lines, depending on
                           the value of an expression
Syntax 1
  ON expression GOSUB line-label-list
Syntax 2
  ON expression GOTO line-label-list
    ■ expression, which will be rounded to an integer if necessary, is an
      index into the list of line labels and line numbers. See Details for
      what happens if the integer value is greater than the number of items
      in the list.
    ■ line-label-list is a set of program line labels and line numbers,
      separated by commas, that identify the branches to be taken. Line
      labels and line numbers can be used in the same list.
See Also  SELECT CASE - to see a more versatile way to code this type of
                          control flow structure