Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Goto doesn't work' topicStudent Support Forum > General > "Goto doesn't work"

Next Comment >Help | Reply To Topic
Author Comment/Response
PhysicsGuy
12/15/12 6:48pm

I know it's not good to use Goto but it's still useful to exit very deep rooted loops. Mathematica apparently doesn't support it well, e.g. in such simple lines even it fails. I don't understand why.

Label["zu"];
Print["zuzu"];
For[i = 1, i < 10, i++,
If[i == 5, Goto["zu"], If[i == 7, Goto["bu"]]]];

Label["bu"];

URL: ,

Subject (listing for 'Goto doesn't work')
Author Date Posted
Goto doesn't work PhysicsGuy 12/15/12 6:48pm
Re: Goto doesn't work jf 12/16/12 7:02pm
Re: Re: Goto doesn't work PhysicsGuy 12/16/12 8:50pm
Re: Goto doesn't work yehuda 12/17/12 09:05am
Re: Goto doesn't work Forum Modera... 12/17/12 10:50am
Re: Goto doesn't work Michael 12/17/12 12:10pm
Next Comment >Help | Reply To Topic