MathGroup Archive 2007

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

Search the Archive

Re: ReplaceAll question


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