MathGroup Archive 2002

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

Search the Archive

AW: Strange ReplaceAll behavior

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36802] AW: [mg36774] Strange ReplaceAll behavior
  • From: Matthias.Bode at oppenheim.de
  • Date: Thu, 26 Sep 2002 04:57:00 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Lawrence,

using Set (=) instead of SetDelayed (:=) in 

f[x_]:=(a+b) /. ru[a]; 

will give you what you desire.

Best regards,

Matthias Bode.

-----Ursprüngliche Nachricht-----
Von: Lawrence A. Walker Jr. [mailto:lwalker701 at earthlink.net]
Gesendet: Mittwoch, 25. September 2002 07:51
An: mathgroup at smc.vnet.net
Betreff: [mg36774] Strange ReplaceAll behavior


Hi,

For the life of me I am not sure why the following is not working in my 
v. 4.2:

ru[a]=a->x;
f[x_]:=(a+b) /. ru[a];

Why do I get
f[c] = b+x

and not
f[c] = b+c?

What gives?

Thanks,
Lawrence

-- 
Lawrence A. Walker Jr.
http://www.kingshonor.com


  • Prev by Date: Why can't Mathematica do this simple integral ?
  • Next by Date: The Innovation Algorithm
  • Previous by thread: RE: Why can't Mathematica do this simple integral ?
  • Next by thread: The Innovation Algorithm