qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
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