This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / Flow Control  /
Goto

  • Goto[ tag ] scans for Label[ tag ], and transfers control to that point.
  • Goto first scans any compound expression in which it appears directly, then scans compound expressions which enclose this one.
  • See the Mathematica book: Section 2.5.9Section 2.5.9.
  • See also: Throw, Switch, Which.

    Further Examples

    This goes on looping until q exceeds 6.

    In[1]:=

    2

    3

    4

    5

    In[2]:=