Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

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

Search the Archive

Switch and List

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Switch and List
  • From: gaylord at ux1.cso.uiuc.edu
  • Date: Tue, 28 Jan 1992 01:27:08 -0600

Switch[expr, {form1, val1, form2, val2, form3, val3}]/.List->Sequence
Switch::argct: Switch called with 2 arguments.
Switch[expr, form1, val1, form2, val2, form3, val3]

Switch[expr, {form1, val1, form2, val2, form3, val3}]/.{x__}->x
Switch::argct: Switch called with 2 arguments.
Switch[expr, form1, val1, form2, val2, form3, val3]

Apply[Sequence, Switch[expr, {form1, val1, form2, val2, form3, val3}], 1] 
Switch::argct: Switch called with 2 arguments.
Switch[expr, form1, val1, form2, val2, form3, val3]

note: you can direct M not to give you the message.

Off[Switch::argct]
Switch[expr, {form1, val1, form2, val2, form3, val3}]/.List->Sequence
Switch[expr, form1, val1, form2, val2, form3, val3]

etc.

gaylord at ux1.cso.uiuc.edu










  • Prev by Date: Re: Limit of Bessel functions
  • Next by Date: Switch and List
  • Previous by thread: Re: Switch and List: How to combine?
  • Next by thread: Switch and List