printed numbers with comma's

This may seem like a silly question. But how can I print numbers with commas?

example

a = 123456
b = 1234
c = 123
d = 123456789
 
-- I would like to print these like this
 
a = 123,456
b = 1,234
c = 123
d = 123,456,789

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
JokerMartini's picture

Simple enough. Thank you.

Simple enough.
Thank you.

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Swordslayer's picture

(dotNetClass

(dotNetClass "System.String").Format "{0:n0}" 123456 --> "123,456"

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.