pl@kuling.UUCP (Per Lindgren) (12/21/89)
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