Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Basic - <b>on...goto branch to </b><b><u>n</b></u><b>th item in line list</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ON...GOTO                Branch to nth Item in Line List

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

    Causes Turbo Basic to branch to one of a list of line numbers and/or
    line labels.

           n    A numeric variable in the range 0 to 255. Upon execution
                of the ON...GOTO statement, Turbo Basic branches to the
                nth item in the list of line numbers/line labels that
                follows the keyword GOTO.

     linenum    A valid line number.

   linelabel    A valid line label.

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

      Notes:    If n is 0 or larger than the number of items in the line
                list, Turbo Basic continues with the next executable
                statement.

                The SELECT and IF block statements are more flexible
                versions of multi-way branching.

See Also: IF ON...GOSUB SELECT

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