Trailing Zero Suppression
Michael D Mays
michael at GreppyDreppies.com
Thu Apr 4 07:43:01 EST 2002
Use the numberFormat property.
set the numberFormat to ".########"
will show 8 digits to the right of the decimal unless they are a trailing
zero.
Note that you have to perform a mathematical operation on the number before
displaying it.
set the numberFormat to ".#######"
put "1.23000000"
would display 1.23000000 in the message box.
set the numberFormat to ".#######"
put "1.23000000"+0
would display 1.23
michael
Richard Harrison of harrison at all-auctions.com wrote the following on 4/3/02
11:07 PM
> Hi there,
>
> Does anyone have a good trailing zero suppression
> routine for eliminating trailing zeroes from decimal numbers?
More information about the use-livecode
mailing list