MathGroup Archive 1992

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

Search the Archive

Switch and List


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