Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>on...gosub branch to nth item in subroutine list</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ON...GOSUB               Branch to nth Item in Subroutine List

 ON n GOSUB {linenum | linelabel}, [,{linenum | linelabel}]...

    Causes QuickBASIC to branch to one of a list of subroutine starting
    lines.

           n    A numeric variable in the range 0 to 255. Upon execution
                of the ON...GOSUB statement, QuickBASIC branches to the
                nth item in the list of line numbers that follows the
                keyword GOSUB.

     linenum    The first line number of a subroutine.

   linelabel    A label identifying the first line of a subroutine.

   -----------------------------------------------------------------------

      Notes:    If n is a noninteger numeric value, QuickBASIC rounds n.

                If n is 0 or larger than the number of items in the
                subroutine list, QuickBASIC continues with the next
                executable statement.

                If n is negative or larger than 255, an Illegal Function
                Call error occurs.

See Also: ON...GOTO

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson