Converting numbers to text and back

Ken Ray kray at
Fri Nov 29 20:44:01 CST 2002


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:


in the message box. Is this not what you want?

Ken Ray
Sons of Thunder Software
Email: kray at
Web Site:

----- Original Message -----
From: "Dar Scott" <dsc at>
To: <use-revolution at>
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

More information about the use-livecode mailing list