Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert digit grouping notation
#2
Exists, but I don't like it.

Macro Macro2482
Code:
Copy      Help
str s="12345678.754" ;;result: 12,345,678.75
;str s="-12345678.754" ;;result: (12,345,678.75). Why?

NUMBERFMT n.Grouping=3
n.lpDecimalSep="."
n.lpThousandSep=","
n.NumDigits=2

str ss.all(s.len*2)
ss.fix(GetNumberFormat(LOCALE_USER_DEFAULT 0 s &n ss ss.nc))
;if(!ss.len) ss=s

out ss


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)