Path: utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!tut!hydra!hylka!teittinen From: TEITTINEN@cc.helsinki.fi (Marko) Newsgroups: comp.sys.ibm.pc Subject: Re: Bug in Turbo C "printf"; potentially serious. I think. Message-ID: <1440@cc.helsinki.fi> Date: 14 Nov 89 18:33:11 GMT References: <2158@leah.Albany.Edu> Organization: University of Helsinki Lines: 19 In article <2158@leah.Albany.Edu>, rds95@leah.Albany.Edu (Robert Seals) writes: [source code deleted...] > > I think that this should result in the line "9.600000 10 9.6\n" being printed > on standard output. > > Turbo C in the small model prints "1" instead of "10"; it seems that whenever > the print format is "%.0lf" and the argument rounds to a power of 10, > printf and fprintf (haven't tried cprintf or sprintf) print 1 too few '0's. > > Workaround: Don't use "%.0lf"!!! Another way to handle this is to find patches for TC. The patches can be found in SIMTEL20 in directory PD1: (or was it ?) -- E-Mail: teittinen@finuh.bitnet ! "Studying is the only way teittinen@cc.helsinki.fi ! to do nothing without Marko Teittinen, student of computer science ! anyone blaming you" -me