Tagged Questions
8
votes
1answer
110 views
Get the name of a symbol passed to a function
I'm trying to get the name of a symbol passed to a function with this:
f[x_] := {SymbolName[x], x}
SetAttributes[f, HoldFirst]
x = 5;
f[x]
But ...