MathGroup Archive 2007

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

Search the Archive

Re: Pattern::nodef: No default setting found for Piecewise in position


On Sep 21, 2:09 am, Szabolcs Horv=E1t <szhor... at gmail.com> wrote:
> Chris Chiasson wrote:
> > Is there a good reason why this shouldn't be fixed?
>
> --> Pattern::nodef: No default setting found for Piecewise in position 2
> when length is 2.
>
> What input produces this message?
>
> --
> Szabolcs

This happens when using Optional in a pattern for the second argument
of Piecewise:

Hold[Piecewise[{{x,blah}}]]/.HoldPattern[Piecewise]
[conditions_,default_.]:>f[whatever]+default

compare with the same command after evaluating:

Unprotect@Piecewise
Default[Piecewise, 2, 2] = 0




  • Prev by Date: I can't see nothing in the notebook. (V5.2)
  • Next by Date: Re: step into dsolve routine on step at a time
  • Previous by thread: Re: Pattern::nodef: No default setting found for Piecewise in position
  • Next by thread: Can i render a Disk[] in Graphics3D?