Computer Science Canada real number to string converison |
Author: | metal_hed [ Wed Feb 18, 2004 5:53 pm ] |
Post subject: | real number to string converison |
I'm making a menu and want to add the total of a calculation in another font besides the default one. When i use the Draw.Font command it will only accept strings. Is there a way to comehow convert the total, which is a real number, to a string so the font.draw will accpet it? |
Author: | Tony [ Wed Feb 18, 2004 6:11 pm ] |
Post subject: | |
Quote: realstr ( r : real, width : int ) : string thought the width part doesn't really seem to do anything You might have to use index() to locate decimal point and round the string yourself if you have to |
Author: | recneps [ Thu Feb 19, 2004 5:42 pm ] | ||
Post subject: | |||
if you need to roundit, just
and then intstr it |
Author: | Tony [ Thu Feb 19, 2004 5:46 pm ] | ||
Post subject: | |||
|
Author: | octopi [ Thu Feb 19, 2004 6:47 pm ] | ||
Post subject: | |||
|