Popular recipes by Richard Zimmerman http://code.activestate.com/recipes/users/2592875/2005-09-15T14:52:09-07:00ActiveState Code RecipesFormats a number for US Currency (Tcl) 2005-09-15T14:52:09-07:00Richard Zimmermanhttp://code.activestate.com/recipes/users/2592875/http://code.activestate.com/recipes/440562-formats-a-number-for-us-currency/ <p style="color: grey"> Tcl recipe 440562 by <a href="/recipes/users/2592875/">Richard Zimmerman</a> . </p> <p>I was in need of a routine to format numbers for a revenue report. I found Andreas Kupries (<a href="http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/146220" rel="nofollow">http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/146220</a>) routine to reformat a number to insert the commas but it didn't address the decimal position alignment. tcl [format] string could format the decimal positions but not insert the commas. So I used Andreas base code and extended it.</p>