FutureBasic Logo

<<    Index    >> FutureBasic

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, 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.

goto's use is strongly discouraged; It can interfere with the compiler's optimization techniques and FutureBasic's other branching and looping structures offer better solutions.

See also
local fn; gosub; for; while; do; if; select case