Page 1 of 1

i2s

PostPosted: Thu Mar 02, 2006 9:19 pm
by Joshua Worth
is there a way to convert an integer to a string?

PostPosted: Fri Mar 03, 2006 12:26 am
by makslane
You can use the sprintf function:

sprintf(text, "%d", integerNumber);

or

sprintf(text, "%f", realNumber);

convert real number to string and assign to variable

PostPosted: Thu May 25, 2006 4:55 am
by geuser7
sprintf(text, "%f", realNumber); I guess can be used I guess to display but how can I convert a real number to a string and assign it to a string variable?

PostPosted: Thu May 25, 2006 5:30 am
by DilloDude
Just use sprintf(stringvariable, "%f", realNumber);

that worked thanks!... other questions:

PostPosted: Thu May 25, 2006 6:16 am
by geuser7
Thanks for your very quick answer... I do have some more questions maybe you or others could help with:
- How can I clear variables - real, int or string (not set to 0 or "" but clear)?
- How can I play a sound after another sound has finished... I want the fact that a sound has finished playing to trigger a new sound to play?
- Are there icon editors that you can suggest (free to start?) ... I have been testing one called IconCool but not getting great results... the incons look blurry... need to find the correct size to create them for both windows and pocket pc..
- I am having a bit of troulbe with load/creating animation graphics... when I load my images file they seem to overlap each while scrolling though they seem to have enough blank space between images..
- Is there a chat room (maybe on icq, yahoo, msn, etc.) that many of you chat at that I can join?