reference wave name with number
mwpro
Can I reference a wave whose name starts with a number using the $string way?
If my wavename is 2000_methane, will Igor recognize $'2000_methane', or $"'2000_methane'"?
I guess in this case, (as when wave name begins with number), an underscore line doesn't make a difference between '2000_methane' and '2000 methane'?
Thank you!
The underscore is part of the name.
The single quotes are needed only when a command or expression needs to be parsed and are not part of the name.
Larry Hutchinson
WaveMetrics
support@WaveMetrics.com
August 11, 2015 at 01:12 pm - Permalink
August 12, 2015 at 10:14 am - Permalink
then it has to be parsed to separate the wave name from the rest of the command. If a simple (i.e., not a path) name is stored in a string:
Duplicate $thename, newwave
then the name doesn't have to be parsed because it is inside an object (the string) that object will be passed along whole to whatever needs the wave name.
Perfectly clear, right?
Basic rule here: a simple name contained in a string variable doesn't need to be parsed, and should not have the single quotes.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
August 12, 2015 at 04:59 pm - Permalink
August 13, 2015 at 10:57 am - Permalink