|
[Date Index]
[Thread Index]
[Author Index]
Re: simple pattern match question
- To: mathgroup at smc.vnet.net
- Subject: [mg91159] Re: simple pattern match question
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 8 Aug 2008 07:12:26 -0400 (EDT)
- References: <g7ed78$2po$1@smc.vnet.net>
Hi,
because you mean f[x_?NumericQ]:=x^2
Regards
Jens
congruentialuminaire at yahoo.com wrote:
> 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:
sum question
Next by Date:
Re: Multiplying a vector over multiple vectors
Previous by thread:
Re: simple pattern match question
Next by thread:
Re: simple pattern match question
|