Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: hunting down problems with my code

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54947] Re: [mg54895] hunting down problems with my code
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
  • Date: Tue, 8 Mar 2005 05:03:33 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

>-----Original Message-----
>From: Chris Chiasson [mailto:chris.chiasson at gmail.com] 
To: mathgroup at smc.vnet.net
>Sent: Saturday, March 05, 2005 7:35 AM
>Subject: [mg54947] [mg54895] hunting down problems with my code
>
>came down to this today:
>
>#_?NumberQ//FullForm
>
>Times[PatternTest[Blank[],NumberQ],Slot[1]]
>
>f_?NumberQ//FullForm
>
>PatternTest[Pattern[f,Blank[]],NumberQ]
>
>It's only amusing after the fact.
>-- 
>Chris Chiasson
>Kettering University
>Mechanical Engineering
>Graduate Student
>1 810 265 3161
>
>

Chris,

what makes you surprised?

In[1]:= f[1]_?NumberQ // FullForm
Out[1]//FullForm=
Times[f[1], PatternTest[Blank[], NumberQ]]


# is just syntactical sugar for Slot[1] (a read macro, so to speak).

--
Hartmut Wolf


  • Prev by Date: Re: Recursion
  • Next by Date: Re: Re: Re: Why does mathematica randomly rewrite notebooks?
  • Previous by thread: hunting down problems with my code
  • Next by thread: Re: hunting down problems with my code