MathGroup Archive 2008

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

Search the Archive

simple pattern match question

  • To: mathgroup at
  • Subject: [mg91151] simple pattern match question
  • From: congruentialuminaire at
  • Date: Thu, 7 Aug 2008 04:42:19 -0400 (EDT)

Hello UG:

I am trying to understand simple pattern rule evaulation. The
following trivial examples baffles me:

In[1]:= f[x_Number] := x ^ 2
In[2]:= f[3]
Out[2]= f[3]

In[3]:= f[3.3]
Out[3]= f[3.3]

In[4]:= NumberQ[3.3]
Out[4]= True
Why is it that f[3.3] does not evaluate??



  • Prev by Date: Re: question about sorting lists
  • Next by Date: RE: Help with StyleSheets
  • Previous by thread: Re: Re: Re: Warning for use of 3D Graphics manipulation
  • Next by thread: Re: simple pattern match question