Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Switch statment: need help' topicStudent Support Forum > General > Archives > "Switch statment: need help"

Next Comment >Help | Reply To Topic
Author Comment/Response
Angelo Trivelli
08/31/99 4:20pm

What is wrong with the following switch statement???

q[x_] := Switch[ x,
      x<0, -1,
      x>1, 1,
      _, 0

q[-10] yields 0 instead of -1,

URL: ,

Subject (listing for 'Switch statment: need help')
Author Date Posted
Switch statment: need help Angelo Trive... 08/31/99 4:20pm
Re: Switch statment: need help Aaron Honecker 09/01/99 6:48pm
Next Comment >Help | Reply To Topic