MathGroup Archive 2009

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

Search the Archive

Re: Help with HoldAll needed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100900] Re: Help with HoldAll needed
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Thu, 18 Jun 2009 04:49:49 -0400 (EDT)
  • References: <h1aaej$8k1$1@smc.vnet.net>

Erich Neuwirth wrote:
> I define
> 
> MyFun[x_]:=Unevaluated[x]
> SetAttributes[MyFun,HoldAllComplete]
> 
> 
> MyFun[2 = 3]
> still evaluated the argument and of course produces an error
> I would like to get the unevaluated expression to be able
> to separate the first argument.
> 
> In fact, I would like MyFun to be a macro which allows me
> to play list processing games with the arguments.
> 
> How can this be accomplished?
> 

Get the first one like this:

MyFun[x_] := First[Unevaluated[x]]
SetAttributes[MyFun, HoldAllComplete]


  • Prev by Date: Re: Huge wide plot placing into a pane
  • Next by Date: Re: Help with HoldAll needed
  • Previous by thread: Re: Help with HoldAll needed
  • Next by thread: Re: Help with HoldAll needed