MathGroup Archive 2008

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

Search the Archive

simple pattern match question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91151] simple pattern match question
  • From: congruentialuminaire at yahoo.com
  • 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??

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