Concatenating Strings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Concatenating Strings

Jeff Linn
Dear Imagineers,
I have been a longtime user of NIH Image and Object Image and am now  
making the leap to ImageJ.  I have a set of macros which I am  
converting to ImageJ and I need to figure out how to concatenate  
three string variables into a single string.

string1 + string 2 + string3

I've checked the archives and the example macros and this wasn't  
clear to me from those sources.  What's the easiest way??

Thanks for your assistance.

Jeff Linn
Reply | Threaded
Open this post in threaded view
|

Re: Concatenating Strings

Martin du Saire
Give this a try:

string1 = "This ";
string2 = "is a ";
string3 = "sentence made up of";
completeSentence = string1+string2+string3+" a bunch of strings.";
print(completeSentence);

Martin

At 04:07 PM 10/3/2005, you wrote:

>Dear Imagineers,
>I have been a longtime user of NIH Image and Object Image and am now
>making the leap to ImageJ.  I have a set of macros which I am
>converting to ImageJ and I need to figure out how to concatenate
>three string variables into a single string.
>
>string1 + string 2 + string3
>
>I've checked the archives and the example macros and this wasn't
>clear to me from those sources.  What's the easiest way??
>
>Thanks for your assistance.
>
>Jeff Linn