Mathematica > Core Language > Procedural Programming > Flow Control > Goto >

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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF