util_commify_number

one of the documented procedures in this installation of the ACS
Usage:
util_commify_number   num
What it does:
Returns the number with commas inserted where appropriate. Number can be positive or negative and can have a decimal point. e.g. -1465.98 => -1,465.98
Defined in: /web/philip/packages/acs-core/utilities-procs.tcl

Source code:


    while { 1 } {
	# Regular Expression taken from mastering regular expressions
	# matches optional leading negative sign plus any
	# other 3 digits, starting from end
	if { ![regsub -- {^(-?[0-9]+)([0-9][0-9][0-9])} $num {\1,\2} num] } {
	    break
	}
    }
    return $num


philg@mit.edu