Hi all,
Here is an example macro and its output:
// start
array = newArray("a", "b", "c");
str1 = myFunction1(); print("str1 = "+str1);
str2 = myFunction2(); print("str2 = "+str2);
function myFunction1() {
x=array[1];
return x;
}
function myFunction2() {
return array[1];
}
// end
output:
str1 = b
str2 = NaN
My question is, why can I not return an array value from a function without assigning it to a variable? Is this a bug or that is how return statement is supposed to work?
Thanks,
Ved
========================
Ved Sharma, Ph.D.
Albert Einstein College of Medicine
Bronx, New York
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html