MathGroup Archive 2013

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

Search the Archive

Re: goto label, no loop, Mathematica 6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129569] Re: goto label, no loop, Mathematica 6
  • From: Tomas Garza <tgarza10 at msn.com>
  • Date: Fri, 25 Jan 2013 01:34:33 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20130123041828.01AF06881@smc.vnet.net>

Bear in mind that Switch is a Mathematica function (cf. Help). Perhaps you 
could state your problem in more detail so that we could understand better 
what you're trying to achieve.
-Tomas

> From: stefanie.schubert at whu.edu
> Subject: goto label, no loop, Mathematica 6
> To: mathgroup at smc.vnet.net
> Date: Tue, 22 Jan 2013 23:18:27 -0500
>
> Hi,
> I'd like to write down my model (several cells) and afterwards implement 
another version of that model. But as I use the same names for variables,
 Mathematica has to "forget" former assignments.
>
> A solution woul be something like that (which I don't know how to do it in Mathematica unfortunately):
>
> Switch=1   (*a variable that can be set to 1 or 2: tell matehmatica to read only Part 1 (or 2)*)
> if Switch=2 goto label_switch2
> Model Part 1 (several cells)
> label_switch2
> MOdel Part 2 (several cells)
>
> But if I'm right, goto is usually used for loops, so that the order is label - goto; but not as required here: goto label
>
> Thanks for any help!!
>
 		 	   		  





  • Prev by Date: Re: Saving mov in v9
  • Next by Date: Re: Mathematica and Lisp
  • Previous by thread: Re: goto label, no loop, Mathematica 6
  • Next by thread: Re: goto label, no loop, Mathematica 6