Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!hal!nic.MR.NET!umn-cs!swie From: swie@umn-cs.CS.UMN.EDU (Swie Tsing Tan) Newsgroups: comp.lang.c Subject: I need help to insert commas as digits separators. Message-ID: <12883@umn-cs.CS.UMN.EDU> Date: 16 May 89 23:43:57 GMT Reply-To: swie@umn-cs.cs.umn.edu (Swie Tsing Tan) Organization: CSci Dept., University of Minnesota, Mpls. Lines: 15 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@umn-cs.cs.umn.edu