MathGroup Archive 1999

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

Search the Archive

Goto[tag] has a strange behaviour

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20844] [mg20844] Goto[tag] has a strange behaviour
  • From: Virgil Stokes <virgil.stokes at neuro.ki.se>
  • Date: Wed, 17 Nov 1999 03:41:01 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Why does the following code not work (in Mathematica 3.01)

   xx = 5;
  If[0 == 0,xx =4;Goto[tag]];
  xx = 3
  Label[tag]; Print[xx];

but, the following codes does work:

  xx = 5;
  If[0 == 0,xx =4;Goto[tag]];
  xx = 3;
  Label[tag]; Print[xx];

The above can be generalized somewhat; but, I do not understand why
the " ;" is needed?

Please reply to me directly since I am unable to receive MathGroup messages.

-- Virgil



  • Prev by Date: Compound Statements and %
  • Next by Date: Nonlinear Regression Code with Only Derivatives Specified
  • Previous by thread: Compound Statements and %
  • Next by thread: Re: Goto[tag] has a strange behaviour