Re: hunting down problems with my code
- To: mathgroup at smc.vnet.net
- Subject: [mg54948] Re: [mg54895] hunting down problems with my code
- From: Chris Chiasson <chris.chiasson at gmail.com>
- Date: Tue, 8 Mar 2005 05:03:34 -0500 (EST)
- References: <4FDA877403669E48A2CB7F1122A7948045C50D@dassne02.da.gei>
- Reply-to: Chris Chiasson <chris.chiasson at gmail.com>
- Sender: owner-wri-mathgroup at wolfram.com
It was just that i expected the slot function would be treated in the same manner as a symbol. As I found out, non-symbols and patterns don't like each other. On Mon, 7 Mar 2005 09:38:58 +0100, Wolf, Hartmut <Hartmut.Wolf at t-systems.com> wrote: > > >-----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: [mg54948] [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 > > -- Chris Chiasson Kettering University Mechanical Engineering Graduate Student 1 810 265 3161