desimal numbers calculation
janschenkel at yahoo.com
Mon Oct 14 07:02:01 EDT 2002
--- Esa_Kivelä <Esa.Kivela at ncrc.fi> wrote:
> Some newbie question:
> I tried to calculate desimal numbers in RR but how
> can code some calculation.
> In the card I have some text filed where users put
> some numbers like 0,5, 3,4 and so on.
> In some field I'd like to show those fields result
> as ie. 0,5 + 3,4 and so on but that + operator in
> the script won't calculate desimal numbers.
> Is there any other way to sum those desimal numbers?
RunRev expects numeric data to have a decimal point.
Therefore, you'll have to convert between 'display'
and 'calculation' format before and after calculation.
If you don't need thousand separators, then it's as
function Conv4Disp pNumber
replace "." with "," in pNumber
function Conv4Calc pNumber
replace "," with "." in pNumber
Hope this helped,
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
More information about the Use-livecode