[Newbies] Stringing a string together!
leves at elte.hu
Mon Dec 6 21:03:06 UTC 2010
On Mon, 6 Dec 2010, Richard Durr wrote:
> You can't. You can, however, create a String representation:
Note that since Squeak 4.1 String >> #, sends #asString to it's argument,
so this will return a string: 'The answer is ', 42, $!.
> StringMorph contents: 'Text Stuff here:' , aSmallInteger asString.
> On Mon, Dec 6, 2010 at 9:31 PM, awood969 <contact at awood969.com> wrote:
>> Hi guys,
>> I am wondering how you can pull different datatypes into a string, for
>> example im trying to do the following with a StringMorph;
>> StringMorph contents: 'Text Stuff Here: ' + SmallInteger asString
>> Hard to explain myself but in PHP it would be;
>> $finalvalue = "Player: " + $myint;
>> and in C would be
>> cout << "Player: " << myint << endl;
>> View this message in context:
>> Sent from the Squeak - Beginners mailing list archive at Nabble.com.
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
More information about the Beginners