On 1/22/13 at 11:18 PM, firstname.lastname@example.org (bob) wrote:
>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
You cannot use Switch as a variable name since this is a built-in function. And it seems to me the built-in function does what you are describing without use of a goto operation.