Re: Prefix[f[x]], why is it not working
- To: mathgroup at smc.vnet.net
- Subject: [mg38941] Re: Prefix[f[x]], why is it not working
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 21 Jan 2003 07:38:28 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <b0app5$dl8$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, because Prefix[] *print* the function f[expr] in the form f @ expr. And printing an expression is quite the oposite of parsing/reading a expression. Regards Jens Ashraf El Ansary wrote: > > Hi all, > Does anyone why f@a_=2 a gives a proper answer for f[1] > and not in the case of Prefix[s[a_]]= 2 a eventhough that Prefix[s[a_]]= > f@a_??? > > Thanks > In[1]:= > f@a_=2 a > f[1] > Out[1]= > 2 a > Out[2]= > 2 > In[3]:= > Prefix[s[a_]] > Prefix[s[a_]]=2 a > s[1] > Out[3]= > s@a_ > Set::write: Tag Prefix in s@a_ is Protected. > Out[4]= > 2 a > Out[5]= > s[1]