Conflicting Switch Statements
- To: mathgroup at smc.vnet.net
- Subject: [mg91394] Conflicting Switch Statements
- From: Todd Allen <genesplicer28 at yahoo.com>
- Date: Wed, 20 Aug 2008 04:03:13 -0400 (EDT)
- Reply-to: genesplicer28 at yahoo.com
Hi Folks, Why is it if you place 2 switch statements next to each other (as in the test code below), the presence of the second switch interferes with proper execution of the first? I feel like I'm missing something fundamental. Would you have any ideas on how to make both switch statements co-exist peacefully, as I really need a good way to control which portions of code get executed inside a manipulate statement? Best regards, Todd Manipulate[ Switch[var1,0,(result=1),1,(result=2)]; Switch[var2,0,(result=3),1,(result=4)]; result, {{var1,0},{0->"Ok",1->"Now"},ControlType->PopupMenu}, {{var2,0},{0->"Please",1->"Work"},ControlType->PopupMenu}]