MathGroup Archive 2008

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

Search the Archive

simple pattern match question


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??

TIA.

Regards..RogerW


  • 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