Path: utzoo!utgpu!watmath!watdcsu!dmurdoch From: dmurdoch@watdcsu.waterloo.edu (D.J. Murdoch - Statistics) Newsgroups: comp.sys.ibm.pc Subject: Re: Turboc floating scanf Message-ID: <5407@watdcsu.waterloo.edu> Date: 11 Jan 89 14:10:44 GMT References: <370@atlas.tegra.UUCP> Reply-To: dmurdoch@watdcsu.waterloo.edu (D.J. Murdoch - Statistics) Organization: U. of Waterloo, Ontario Lines: 14 In article <370@atlas.tegra.UUCP> vail@tegra.UUCP (Johnathan Vail) writes: > >I am using the "latest" version of TurboC and am trying to use scanf >to read floats. I give tcc a '-f' or '-f87' switch but I still get a >run-time error from scanf when it tries to read in a float. According to someone on CIS, this is a known bug. A workaround is to include a reference to a procedure called "turboFloat()". Don't call it; stick it somewhere where the linker will see it but it won't get executed. You can also fiddle around with the way you specify the value to be written. Apparently the compiler only forgets the turboFloat reference in certain complicated constructions. Duncan Murdoch