Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert digit grouping notation
#1
I have written the following function to insert a digit grouping comma to a double precision value converted to string:

Function tempf11
Code:
Copy      Help
double x=12345.68
str s=x
int i=find(s ".")

i=iif(i<0 len(s)-3 i-3)
if i > 0; s.insert("," i)

out s

I wonder whether there exists a system function to do it in an elegant way.

Many thanks in advance.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)