solution to "" in 'Recursively list'
Posted by ed3203 on Feb 11, 2011; 10:30am
URL: http://imagej.273.s1.nabble.com/Recursively-lists-tp3685716p3685719.html
hi,
just posting the answers I've received so that the question doesn't get asked over and over again by others with the same query!
"If you don't have the "" at the beginning, sometimes, it will try to convert "dir" and "list[i]" to numbers and add them together. I'm not sure under what conditions that occurs... But, by starting with "", it must somehow force it to be text instead of a number. "
"I suspect the "" is there to work around a bug in the macro interpreter. It forces the interpreter to concatenate the dir and list[i] string variables. Without the "" the interpreter attempts to add the two variables, which creates a NaN (not a number) numeric result."
Thanks to Wayne and Jeff!!
ed