Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: goto label, no loop, Mathematica 6
Replies: 3   Last Post: Jan 26, 2013 4:58 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Tomas Garza Hernandez

Posts: 262
Registered: 4/15/05
Re: goto label, no loop, Mathematica 6
Posted: Jan 24, 2013 1:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



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@whu.edu
> Subject: goto label, no loop, Mathematica 6
> To: mathgroup@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!!
>







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.