Login  Register

Re: String variable made with other variables?

Posted by pognonec on Feb 26, 2016; 11:12am
URL: http://imagej.273.s1.nabble.com/String-variable-made-with-other-variables-tp5015716p5015732.html

Hi Philippe and Christophe,

I got tired fighting with that, and screwed up in my last answer. I did mean, as you suggested:
b= 10;
e = 2;
d = b + "-" + e;
print(d);

This is what does not work, "-" being error.

BUT Christophe's second proposal does work :-)
b= 10;
e = 2;
d = "" + b + "-" + e;
print(d);


Thanks to all!
Philippe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html