Converting numbers to text and back
Ken Ray
kray at sonsothunder.com
Fri Nov 29 20:44:01 EST 2002
Dar,
I'm not sure what you mean... Rev does this conversion automatically for
you, so if you do something like:
on mouseUp
put "123.456" & empty into tNumString
set the numberFormat to "###.##"
put (tNumString+0)
end mouseUp
You end up getting:
123.46
in the message box. Is this not what you want?
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Dar Scott" <dsc at swcp.com>
To: <use-revolution at lists.runrev.com>
Sent: Friday, November 29, 2002 6:32 PM
Subject: Converting numbers to text and back
> Is there a value I can set numberFormat to so that this is true for any
> x that contains a number?
>
> (x + empty) + 0 = x
>
> I want to convert a value that is internally a number to a string such
> that when I convert it back it is the same or very close.
>
> I'd like to use a method that uses numberFormat, but I'm willing to look
> at others.
>
> Dar Scott
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list