FutureBasic Logo

<<    Index    >> FutureBasic 5

goto   statement



Syntax:
goto {lineNumber|"statementLabel"}

Description:
Causes program execution to continue at the statement at the indicated line number or statement label. The target statement must be within the same "scope" as the goto statement (i.e., they must both be within the "main" part of the program, or they must both be within the same local function). Also, you should never use goto to jump into the middle of any "block" statement structures (such as for...next, select...end select, long if...end if, etc.).
goto is sometimes useful in the "main" part of the program, to branch around certain structures. However, excessive use of goto can lead to code that is difficult to read and maintain. The use of goto is generally discouraged; FutureBasic's other branching and looping structures offer a better solution.

See Also:
local fn; gosub; for; while; do; long if; select case