Converting numbers to text and back
Dar Scott
dsc at swcp.com
Sat Nov 30 01:23:01 EST 2002
On Friday, November 29, 2002, at 08:42 PM, Ken Ray wrote:
> Well, I ran the code you provided and got "true" in the message box. Is
> this
> what you want?
I apologize Ray. I needed to run off and rattled off something too
fast. I should have waited until I could give this proper consideration
and not waste your time.
Consider this:
on mouseUp
set numberFormat to "0.0000000000000000"
put 1/3 into f
put empty into field "Report"
repeat with theE = -100 to 100
put f * 10 ^ theE into x
put x & lineFeed after field "Report"
end repeat
end mouseUp
For the first several rows I get zeros. I really want small numbers.
For the last few rows I get long numbers.
I think I have to find a way that does not use numberFormat. Upon
consideration that seems obvious.
I will experiment with format(), which I have ignored, thinking it was
just there for C programmers. Maybe I thought so before I understood
more about Revolution numbers.
Dar Scott
More information about the use-livecode
mailing list