Delimiting thousandths..converting 12345678 to 12, 345, 678 for example

Mark E. Powell runrev at aboutmyfiles.com
Tue Jun 12 18:52:59 EDT 2007


Thank you, Ken.  Works like a charm.
-----------------------------------------------
Here you go - this is based on a function that Mark Wieder created:

function formatThousands pNum,pSeparator
  repeat with x = length(pNum)-3 to 3 step -3
    put pSeparator before char x+1 of pNum
  end repeat
  return pNum
end formatThousands

To call it:

  put formatThousands("10000000",",")
  --> 10,000,000






More information about the use-livecode mailing list