Re: Help with Hold
- To: mathgroup at smc.vnet.net
- Subject: [mg100951] Re: [mg100917] Help with Hold
- From: Carl Woll <carlw at wolfram.com>
- Date: Thu, 18 Jun 2009 20:45:49 -0400 (EDT)
- References: <200906180852.EAA19966@smc.vnet.net>
Erich Neuwirth wrote: > 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? > > Here is one possibility: In[907]:= Replace[ Hold[x, Null, y, Null, Null], {Null -> Null, v_ :> With[{tmp = ToString[Unevaluated[v]]}, tmp /; True]}, {1}] Out[907]= Hold["x", Null, "y", Null, Null] Carl
- References:
- Help with Hold
- From: Erich Neuwirth <erich.neuwirth@univie.ac.at>
- Help with Hold