MathGroup Archive 2003

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

Search the Archive

How to convert string to variable name

  • To: mathgroup at
  • Subject: [mg39795] How to convert string to variable name
  • From: Bob Harris <NspamITmeLION at MINDnotSPRING.COM>
  • Date: Fri, 7 Mar 2003 03:39:46 -0500 (EST)
  • Sender: owner-wri-mathgroup at


I'm trying to write a loop that assigns functions to a series of variables
which I'd like to name z, y, x, w, ... and so on.  The functions are matrix
operator of a group, which I would use like this, for example:

    state // w // z // w // w

Clearly I can generate the strings "z", "y", "x", "w" ... in my loop.  But
for a given string, how can I assign to the variable whose name is defined
by that string?

-- Bob Harris =======================================================+
| If stupidity got us into this mess, how come it can't get us out   |
| of it?                                                             |

  • Prev by Date: Re: Desciphering Solve[] output.
  • Next by Date: pattern matching with repeated named patterns
  • Previous by thread: Re: Mathlink problem with number format
  • Next by thread: Re: How to convert string to variable name