MathGroup Archive 2009

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

Search the Archive

Re: Help with Hold


I don't know how to do this is one doesn't know what the symbols are, i.e.,
I don't know how to extract the unevaluated symbol names from the
expression. But if you know what the symbol names are then you could use the
following:

x = 3; y = 1;
test = Hold[x, Null, y, Null];

Block[{x, y},
  List @@ (If[# =!= Null, SymbolName[#], Null] & /@ test)] // FullForm
List["x", Null, "y", Null]


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  



From: Erich Neuwirth [mailto:erich.neuwirth at univie.ac.at] 


How can I transform
Hold[x,Null,y,Null,Null]
into
{"x",Null,"y",Null,Null}
even if x and/or y have assigned values?




  • Prev by Date: Re: Manipulate function
  • Next by Date: Re: Help with Hold
  • Previous by thread: Re: Re: Help with Hold
  • Next by thread: Re: Help with Hold