Hi Tiana,

There's a script on rebol.org called format.r that does that sort of thing
and more:

    http://www.rebol.org/utility/format.r

>> format 1 / 3 #.1
== "0.3"
>> reformat [pi pi pi pi pi] [#.1 #.2 #.3 #.4 #.5]
== ["3.1" "3.14" "3.142" "3.1416" "3.14159"]


Hope it helps. Please send me any comments you have.

Cheers,
Eric

-------------------------

>Hello,
>
>Can anyone tell me how to format the result of divide operation?
>
>Say, 1 / 3 gave me the result 0.33333333
>what can I do in order to get 0.3 which has only one digit after the point?
>
>Thanks for any information.
>
>Tiana



Reply via email to