Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!bmc!kuling!pl From: pl@kuling.UUCP (Per Lindgren) Newsgroups: comp.sys.mac.programmer Subject: Think C 4.0 sprintf question Message-ID: <1310@kuling.UUCP> Date: 21 Dec 89 11:48:14 GMT Organization: DoCS, Uppsala University, Sweden Lines: 30 A little question on Think C 4.0 and sprintf-ing of floats... I use LSC 4.0 with the class library, but a few weeks ago a type of sprintf stopped to give a correct result. I have the scanf-patch, but that doesn't matter, does it? Anyway, here is some code: char foo[20]; float aFloat; . . . aFloat = 3.14; sprintf(foo, "%f", aFloat); yields "0.000034" or something similarily small in foo. I tried to build a new project that did nothing more than the above, and then it worked as expected! This of course makes it look like I am at fault, and not LSC. The problem occured *months* after I started on the program... I have tried the easy things, rebuilding the entire project, the ANSI library, but nothing helped. Since I am fairly new to *C* programming (but not Mac-ditto), I may have missed something rather simple... I am working on the same machine (and disk) as when I started the project. How do I get on the "macoops" (or whatever the name was) mailing list? Thanks in advance for any replies. Per Lindgren