This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

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 that enclose this one.
Write a loop using Goto and Label:
Write a loop using Goto and Label:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
New in 1 | Last modified in 3