Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

You're going to first need to hold {data1,data2} unevaluated in some way; either define it first, use SetDelayed (short form :=), or use Hold. I choose :=.

data1 = {1, 1};
data2 = {2, 2};
datalist := {data1, data2};

Cases[OwnValues[datalist], x_ :> ToString@Unevaluated@x, {3}] // Rest
{"data1", "data2"}

Or using my step functionmy step function:

Cases[step[datalist], x_ :> ToString@Unevaluated@x, {2}]
{"data1", "data2"}

You're going to first need to hold {data1,data2} unevaluated in some way; either define it first, use SetDelayed (short form :=), or use Hold. I choose :=.

data1 = {1, 1};
data2 = {2, 2};
datalist := {data1, data2};

Cases[OwnValues[datalist], x_ :> ToString@Unevaluated@x, {3}] // Rest
{"data1", "data2"}

Or using my step function:

Cases[step[datalist], x_ :> ToString@Unevaluated@x, {2}]
{"data1", "data2"}

You're going to first need to hold {data1,data2} unevaluated in some way; either define it first, use SetDelayed (short form :=), or use Hold. I choose :=.

data1 = {1, 1};
data2 = {2, 2};
datalist := {data1, data2};

Cases[OwnValues[datalist], x_ :> ToString@Unevaluated@x, {3}] // Rest
{"data1", "data2"}

Or using my step function:

Cases[step[datalist], x_ :> ToString@Unevaluated@x, {2}]
{"data1", "data2"}
deleted 37 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

You're going to first need to hold {data1,data2} unevaluated in some way; either define it first, use SetDelayed (short form :=), or use Hold. I choose :=.

data1 = {1, 1};
data2 = {2, 2};
datalist := {data1, data2};

Cases[OwnValues[datalist], x_ :> ToString@Unevaluated@x, {3}] // Rest
{"data1", "data2"}

Or using my step function:

Cases[step[datalist], x_ :> ToString@Unevaluated@x, {2}]
{"data1", "data2"}

Or if you prefer not to use that:

You're going to first need to hold {data1,data2} unevaluated in some way; either define it first, use SetDelayed (short form :=), or use Hold. I choose :=.

data1 = {1, 1};
data2 = {2, 2};
datalist := {data1, data2};

Cases[OwnValues[datalist], x_ :> ToString@Unevaluated@x, {3}] // Rest
{"data1", "data2"}

Or using my step function:

Cases[step[datalist], x_ :> ToString@Unevaluated@x, {2}]
{"data1", "data2"}

Or if you prefer not to use that:

You're going to first need to hold {data1,data2} unevaluated in some way; either define it first, use SetDelayed (short form :=), or use Hold. I choose :=.

data1 = {1, 1};
data2 = {2, 2};
datalist := {data1, data2};

Cases[OwnValues[datalist], x_ :> ToString@Unevaluated@x, {3}] // Rest
{"data1", "data2"}

Or using my step function:

Cases[step[datalist], x_ :> ToString@Unevaluated@x, {2}]
{"data1", "data2"}
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

You're going to first need to hold {data1,data2} unevaluated in some way; either define it first, use SetDelayed (short form :=), or use Hold. I choose :=.

data1 = {1, 1};
data2 = {2, 2};
datalist := {data1, data2};

Cases[OwnValues[datalist], x_ :> ToString@Unevaluated@x, {3}] // Rest
{"data1", "data2"}

Or using my step function:

Cases[step[datalist], x_ :> ToString@Unevaluated@x, {2}]
{"data1", "data2"}

Or if you prefer not to use that: