MathGroup Archive 2009

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

Search the Archive

Re: Help with HoldAll needed


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