Re: Pattern::nodef: No default setting found for Piecewise in position
- To: mathgroup at smc.vnet.net
- Subject: [mg81402] Re: Pattern::nodef: No default setting found for Piecewise in position
- From: Chris Chiasson <chris.chiasson at gmail.com>
- Date: Sat, 22 Sep 2007 03:24:14 -0400 (EDT)
- References: <fct8pl$pqu$1@smc.vnet.net><fcvqmc$7jj$1@smc.vnet.net>
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