Hi Jamal,Jamal wrote: P.S. For my info, may be someone can tell what situation(s) one may one use a negative number in the decimal places parameter in the Round() function. I've never seen it or needed it.
Based on this link, I've created a statistic that uses a negative value to round the number of the population
https://ec.europa.eu/eurostat/statistic ... ad_example
Code: Select all
FUNCTION Statistic() AS VOID
LOCAL aPopulation AS ARRAY
LOCAL dwCurrentDecSep, dwLen, i AS DWORD
aPopulation := {{ "BE" , 9660154 } , {"DE" , 61194591 } , { "IT" , 53685300 } , { "LU" , 338500m } , { "NL" , 12957621 } }
dwLen := alen ( aPopulation )
?
FOR i := 1 UPTO dwLen
? aPopulation [ i , 1 ] + _chr(9) + transform (Round ( aPopulation [ i , 2 ] , -4 ) / 1000 , "999 999" )
NEXT
?
dwCurrentDecSep := setdecimalsep ( asc ( "." ) )
?
FOR i := 1 UPTO dwLen
? aPopulation [ i , 1 ] + _chr(9) + transform ( ( Round ( aPopulation [ i , 2 ] , -4 ) / 10000 ) / 100.00 , "9999.99" )
NEXT
setdecimalsep ( dwCurrentDecSep )
?
RETURN
regards
Karl-Heinz