keyInField

Rob Cozens rcozens at pon.net
Thu Sep 26 13:33:01 EDT 2002


>Now : 2 problems :
>
>1) I'd like the separator of decimal is a comma and not a point.
>is it possible ?
>
>2) I' d like a separator for the thousands (a space for example)
>
>
>so : 123456789 ->  1 234 567,89
>
>can you insert that in your script ?

Hi again Yves,

If you do choose to use Serendipity Library, the last example I 
posted is only partially correct:  The formatNumber function is used 
to format user input (which uses the decimal separator speficifed in 
the stack's numberEditMask); A different function, convertNumber, is 
used to format numbers in generic format (ie: no thousands separator 
& "." as decimal separator.).

Also, the functions only work with explicit decimals, so (assuming 
comma & space as above) formatNumber("123456789",2) returns "123 456 
789,00"

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"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 mailing list