Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Extracting the name of a variable

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26883] Extracting the name of a variable
  • From: Mike Yukish <may106 at psu.edu>
  • Date: Fri, 26 Jan 2001 01:27:27 -0500 (EST)
  • Organization: Penn State University, Center for Academic Computing
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

I'd like to make a function that extracts the name of a variable and
makes a string. So the function would do:

In:  z = 4

In: nameExtract[z]

Out: "z"

It appears to not be so simple, since once you assign z a value, the
function SymbolName[z] returns an error. what's the trick?

I want to do this so I can make a function takes z as an argument, and
generates a name:value pair  "z=4"



  • Prev by Date: metacharacters as record separators
  • Next by Date: Napoleon
  • Previous by thread: Re:Re: metacharacters as record separators
  • Next by thread: Re: Extracting the name of a variable