Following this post, I defined a macro inside a function:
macro Name(arg)
string(arg)
end
function myfunc(df)
@Name df
end
tf = 3
myfunc(tf)
What I want is:
''tf''
But what I actually got is
''df''
Is there a way to achieve this?
Thanks
dfto the macro right here:@Name df, so then you will get "df". Furthermore, functions cannot know the names of the outside variables being passed to them, only their values. You'll have to somehow apply the the macro outsidemyfunc.@Name(tf)