Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!udel!mmdf From: R_MCINTI%UNHH.BITNET@mitvma.mit.edu Newsgroups: comp.sys.amiga Subject: Lattice atof() - printf() Bug? Message-ID: <30123@nigel.ee.udel.edu> Date: 11 Sep 90 16:29:39 GMT Sender: mmdf@ee.udel.edu Lines: 33 In article <29545@nigel.ee.udel.edu> R_MCINTI%UNHH.BITNET@mitvma.mit.edu writes: >>> regarding the atof() problem in lattice "C" >> >>The atof() seems to work fine; the difficulty is in the >>printf() routine. I beleive with many vendors there are >>two seperate printf() functions; one for interger math , and >>one for double precision. It is perhaps the latter function >>that is too blame - in fact it may not exist - which would explain >>why when you write printf("%f",double_number) you end up with "%f" >>on the screen since the first function is unaware of the %f option, therefore >>treats it as though it is a string. >> >>To sum up - Yeah I think it's a bug and it has been bothering me for some time ! >Try linking with a math library e.g. lcm.lib. This should solve your 'bug'. -- >Andreas Klingler >akk@trantor.informatik.uni-erlangen.de > A business is no business until you have shown the revenue office > it was no business Please - no more - Oh-little-boys-please-link-with-lcm.lib. The FACTS: - Using Lattice C 5.02 - Including or with appropriate math libraries linked in before lc.lib PROBLEM: atof() works - But how do you print it out? printf() with the %f or %g option does not seem to work.- Bug ? Thanks in advance for any help. - Scott McIntire