int myNumber=3456; //this is our integer
string myString = myNumber; //copy the integer into a variable of data type 'string'
alert("string", myString); //alerts the string variable

/*myString is created as the string data type. Placing the integer value of myNumber in an existing string variable will end up having that number as a string data type in the string variable.*/


//or


int myNumber=3456; //create our integer
alert("string", ""+myNumber); //alert the integer directly by adding it to the end of an empty string during use where string data type is required



/*In the second example, the two quotes specifies an empty string, and the plus sign makes the integer value of myNumber get added to the end of that string. Since there was nothing between the quotes, there would be nothing before the number in the resulting string.*/

sent with Thunderbird 16.0.1 Portable
On 1/8/2013 4:20 AM, Gabriel Battaglia (Kriyaban) wrote:
Hi.
Sorry, could someone help me to find out how to convert a number into a string?
I got the opposite function which is: string_to_numer.
Thanks. Gabriel.
|---------< Gabriel Battaglia (Kriyaban) >-----|
|- Skype: gabriel_battaglia
|-----------------------------------|


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

____________________________________________________________________________________
Use the link below to report this message as spam.
https://lavabit.com/apps/teacher?sig=3941524&key=574445591
____________________________________________________________________________________



---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to