passing names in functions

I went through the tag documentation as well as for names and can't figure out how to pass names into the tag function. I'm trying to make a new tag automatically that is anchored to the provided cursor possition


eg:

string tagname="tag1"
string cursorname="A"
Tag/C/N=tagname/F=0/L=1/TL=0 $CsrWave(cursorname), xcsr(cursorname),"\\OX"

Igor does not recognize the cursorname (xscr(A) does work) and the new tag has name "tagname." Any ideas on how to fix this problem? Thank you.

You need $tagName.

Execute this for details:
DisplayHelpTopic "Converting a String into a Reference Using $"


I believe the same will work for the cursor name.
jsingh wrote:
I went through the tag documentation as well as for names and can't figure out how to pass names into the tag function. I'm trying to make a new tag automatically that is anchored to the provided cursor possition


eg:

string tagname="tag1"
string cursorname="A"
Tag/C/N=tagname/F=0/L=1/TL=0 $CsrWave(cursorname), xcsr(cursorname),"\\OX"

Igor does not recognize the cursorname (xscr(A) does work) and the new tag has name "tagname." Any ideas on how to fix this problem? Thank you.



Thank you.