MathGroup Archive 2007

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

Search the Archive

Re: ReplaceAll question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82528] Re: [mg82513] ReplaceAll question
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 24 Oct 2007 04:19:36 -0400 (EDT)
  • References: <200710230929.FAA29043@smc.vnet.net>

On 23 Oct 2007, at 18:29, Yaroslav Bulatov wrote:

> b = 3;
> Hold[a[[b]]] /. {b -> c}
>
> ReplaceAll has no effect, why? What is the recommended way of carrying
> out the replacement above?
>
>

  b = 3;
Hold[a[[b]]] /. {HoldPattern[b] -> c}
Hold[a[[c]]]

Andrzej Kozlowski


  • Prev by Date: Re: Integrate question
  • Next by Date: Re: ReplaceAll question
  • Previous by thread: ReplaceAll question
  • Next by thread: Re: ReplaceAll question