Coerce number into numberFormatted integer--How?
rcozens at pon.net
Wed Jul 10 12:03:01 EDT 2002
>>So, we can see it *is* working.. But how to coerce the simple integer that
>>is not a result of math into the dollar format... I *can* just "fake" a
>>calculation put (1*tShipping) into tShipping. And that works, but, hoping
>>not to have to be doing that in the long term, as one day someone else
>>looking at the code will be asking "What is That for?" I suppose if there is
>>no other option we will just explain that line with a comment... And end up
>>with two extra lines of workaround code.
>First the creation of dollar strings
>You can make a few functions called dollar and dollarComma and
>dollarCommaSign, or some better names you think up.
Dar, et al:
OR, as I eMailed Sivakatirswami privately this morning, you can
request a "pre-prerelease" version of The Serendipity Library:
FYI, my soon-to-be-prereleased Revolution library includes handlers to:
* Convert numbers stored in "generic format" to a display format
selected by the user.
* Convert numeric user input into the selected display format.
* > Pad or strip (w/rounding) trailing decimal digits to a specified
* Strip a number formatted for display, converting it to a "generic
format" for storage.
* Validate user input is numeric.
It also includes a dialog stack to set a mainstack's number format
property, which specifies currency symbol (leading/trailing),
thousands separator, and decimal separator.
The library will be released for free distribution when testing &
documentation are completed.
The above routines have been completed & tested; however
documentation is not finished yet.
If you would like a pre-prerelease version, I would be happy to
provide it to you.
Any other interested parties should contact me privately.
CCW, Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the Use-livecode