Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Named patterns forbidden in Except?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110453] Re: Named patterns forbidden in Except?
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Sat, 19 Jun 2010 07:47:20 -0400 (EDT)
  • References: <hvevvo$jpk$1@smc.vnet.net>

On 18/06/10 06:25, cca at gregosetroianos.mat.br wrote:
> Hi,
>
> Consider this:
>
> In[1]:= Cases[{-0.5, 1, -3, 2/5, I}, Except[x_Integer]]
>
> During evaluation of In[1]:= Except::named: Named pattern variables are not
> allowed in the first argument of Except[x_Integer].>>
>
> Out[1]= {}
>
> Why are named patterns not allowed in Except?
>


I guess the point is that you could never use the name - because in your 
example, if x took a value, Except would fail to match by definition!

David Bailey

http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Bar chart style with ListPlot
  • Next by Date: color legend
  • Previous by thread: Named patterns forbidden in Except?
  • Next by thread: Re: Named patterns forbidden in Except?