Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: Formatting Numbers, decimals |
From: | Branden Hall |
Date: | Thu, 13 Jul 2000 13:30:04 +0100 |
The best way I have found is:
say we have the number 23.12623
and we want to reduce it down to 23.13
first take the int of the number and subtract that from the actual number to
get .12623
then add .005 to that to get .13123
then multiply that times 100 to get 13.123
then take the int of that (13) and divide it by 100 to get .13
then just add .13 to the int of the orginal number (23) to get 23.13
-= Branden J. Hall
-= Multimedia Developer / Instructor
-= Fig Leaf Software - "We've got you covered!"
-----Original Message-----
From: ownerchinwag [dot] com [ownerchinwag [dot] com]On">mailto:ownerchinwag [dot] com]On Behalf Of Helen
Triolo
Sent: Wednesday, July 12, 2000 11:41 AM
To: flasherchinwag [dot] com
Subject: Re: FLASH: Formatting Numbers, decimals
jwoodw - Jeffrey Woodward wrote:
>
> I guess the only problem left with this issue is to take care of numbers
> that happen to come out as decimals, i.e. - .54321 - Would you use some
more
> "If" statements to handle this scenerio?
If the number might be a decimal (of unknown precision), I'd add another
loop to scan the string from right to left until the decimal is found,
and note where it appears (set a variable). Then modify the existing
code to not put out any commas before the decimal is reached (and modify
the line that checks for multiples of 3 to take into account the extra
stuff to the right of the decimal). That's what I'd do but maybe
there's an easier way -- if you come up with a good routine, post the
code!
---------------------------------------------------
helen triolo � http://i-technica.com � 301-424-6037
Flash Q&A archive � http://i-technica.com/flashlist
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
Re: FLASH: Formatting Numbers, decimals, Wayne Pennell \( Web Mast
Re: FLASH: Formatting Numbers, decimals, Helen Triolo
Replies
Re: FLASH: Formatting Numbers, decimals, Helen Triolo
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]