Path: utzoo!attcan!uunet!wuarchive!usc!elroy.jpl.nasa.gov!sdd.hp.com!uakari.primate.wisc.edu!uflorida!mephisto!mcnc!rti!mozart!walker From: walker@unx.sas.com (Doug Walker) Newsgroups: comp.sys.amiga Subject: Re: Lattice atof() - printf() Bug? Message-ID: <1990Sep19.174318.22565@unx.sas.com> Date: 19 Sep 90 17:43:18 GMT References: <30123@nigel.ee.udel.edu> Organization: SAS Institute Inc. Lines: 35 In article <30123@nigel.ee.udel.edu> R_MCINTI%UNHH.BITNET@mitvma.mit.edu writes: > >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 There is no known bug in the 5.02 libraries with %f or %g. I am still not convinced you are getting the right printf. Make sure you are using lcmr.lib if you are using registerized parameters (-rr). Use the cross-reference and map to determine where your printf comes from. Leave off lc.lib or lcr.lib from your link line and make SURE that printf doesn't come through as undefined. (Actually link with JUST the math library and make sure it does get defined.) Are your math libraries linked in before amiga.lib as well? (They should be.) Compile this: #include void main(void) {printf("%g\n", 0.0);} with the line 'lc -Lm test' and see if it works correctly. What compile line are you using? What math options? What link line? ***** =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 = *|. o.| || | o |// For all you do, this bug's for you! ====== usenet: ...mcnc!rti!sas!walker plink: dwalker bix: djwalker