MathGroup Archive 2007

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

Search the Archive

Re: Releasing several Holds simultaneously

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82358] Re: Releasing several Holds simultaneously
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Thu, 18 Oct 2007 04:56:41 -0400 (EDT)
  • References: <ff1po5$90n$1@smc.vnet.net>

Andrew Moylan wrote:
> Hold[a := Hold[1]]
> 
> How can I release both of these Holds (and thus execute a:=1)
> simultaneously?
> 
> ReleaseHold[%] doesn't work; it evaluates a := Hold[1] before the other hold
> is removed.
> 
> % /. Hold[x_]:>x does the same thing, because /. only matches once per part.
> 
> 
Try

Hold[a := Hold[42]] /. Hold -> Identity

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: magnification problems
  • Next by Date: Re: Finds strings in a list that begin with "A"
  • Previous by thread: Re: Releasing several Holds simultaneously
  • Next by thread: Integrate question