I need help to insert commas as digits separators.

Swie Tsing Tan swie at umn-cs.CS.UMN.EDU
Wed May 17 09:43:57 AEST 1989


Could someone please tell me if there is an easy way to insert commas as digits 
separators for "int", "long", "longdouble", and "double", without affecting 
the digit accuracy ?

For example,  -123456789.12345  becomes -123,456,789.12345
                  111222        becomes 111,222 etc.

I have written a routine to convert "string" <-> "number", but it seems to me
that I lost some digits accuracy.

Could you please e-mail to me if you know the answer ?

Thanks in advance.

swie at umn-cs.cs.umn.edu



More information about the Comp.lang.c mailing list