Goto

Goto[tag]

scans for Label[tag], and transfers control to that point.

Details

  • Goto first scans any compound expression in which it appears directly, then scans compound expressions that enclose this one.

Examples

Basic Examples  (1)

Write a loop using Goto and Label:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

See Also

Throw  Switch  Which  Break  Continue

Tutorials

Introduced in 1988
(1.0)
| Updated in 1996
(3.0)