MathGroup Archive 2009

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

Search the Archive

Re: Help with Hold

  • To: mathgroup at
  • Subject: [mg100976] Re: Help with Hold
  • From: Peter Breitfeld <phbrf at>
  • Date: Thu, 18 Jun 2009 20:50:28 -0400 (EDT)
  • References: <h1cv8s$jfg$>

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?

Do you want something like this: 

List @@ Fold[ReplacePart[#1, #2 -> Extract[#1, #2, ToString]] &, expr,
    Reverse[Sort[pos]]] // InputForm


In= stringList[hh]
Out={"x", "Null", "y", "Null", Null}

In= y=2; stringLst[hh]
Out={"x", "Null", "2", "Null", Null}

Peter Breitfeld, Bad Saulgau, Germany --

  • Prev by Date: Re: How to define the coefficients of a polynomial to
  • Next by Date: Re: Manipulate function
  • Previous by thread: Re: Help with Hold
  • Next by thread: Solving Polynomial equation