Is it really this hard to print currency values?
Andrew Kluthe
andrew at rjdfarm.com
Sun Jul 29 12:28:15 EDT 2012
function commaFormat tNum
put tNum mod 1 into remainder
delete char 1 of remainder
put trunc(tNum) into tNum
put the number of chars in tNum into n
repeat with i = 1 to trunc((n-1)/3)
put comma after char n - 3*i of tNum
end repeat
return tNum& remainder
end commaformat
function currencyFormat tNum
put commaFormat(tNum) into sNum
return "$" & sNum
end currencyFormat
should be useful.
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Is-it-really-this-hard-to-print-currency-values-tp4652980p4652981.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list