>I think so it's not an important bug. because there is a workaround. I found this error in fpd26, but I could find a workaround so I didn't reported it:
>
>?transform(roun(xnum,2),"999,999,999.99") &&--- sometimes it gives strange ascii characters with some numeric values
>
>
>xnum2=roun(xnum,2)
>?transform(xnum2,"999,999,999.99") &&--- workaround
>
>a second (again fpdos),
>-when set decimal to 5
>-and fields has decimal 2 after point
>
>sometimes I doing some numeric processes with fields (* and /)
>foxpro dos hangs up. I use round(...,2) and fpd don't hangs up than anymore.
>
>
this is not a workaround.
the problem is this:
- print a numeric variable,
with N > SET("decimals") decimals
and format 999,999.9...M...9 with M > SET("decimals")
example:
clear
set decimal to 3
nvar=9999.9995
cFormat ="9,999.99999"
? transform(nvar,"@R "+cFormat)
? PrintNumber ( nvar , cFormat )
nvar=9999.999585
? transform(nvar,"@R "+cFormat)
? PrintNumber ( nvar , cFormat )
PROCEDURE PrintNumber ( n , format )
nSetDec = SET("Decimals")
SET DECIMALS TO LEN(JUSTEXT(m.cFormat ))
cRet= transform(ROUND(nvar,SET("Decimals")),"@R "+cFormat)
SET DECIMALS TO m.nSetDec
RETURN m.cRet