MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: goto and label

  • To: mathgroup at
  • Subject: [mg57776] Re: goto and label
  • From: Bill Rowe <readnewsciv at>
  • Date: Wed, 8 Jun 2005 03:21:24 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 6/7/05 at 2:03 AM, guyi1 at (Guy Israeli) wrote:

>can someone give clearer instruction on how to use Goto and label
>than the help offers?

Here is an example from the help browser:

q = 2; Label[begin]; Print[q]; q += 1; If[q < 6, Goto[begin]]

But note, the same result could have been achieved with

q = 2;
While[q < 6, Print[q]; q += 1]

without the label.

Even better using functional programming


The point is while Mathematica has Goto, it isn't needed in practice.
To reply via email subtract one hundred and four

  • Prev by Date: WolframNotebookIndexer
  • Next by Date: Re: Coloring in ShowGraph[]
  • Previous by thread: Re: goto and label
  • Next by thread: 3D Plot formatting