Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uupsi!sunic!dkuug!diku!juul From: juul@diku.dk (Anders Juul Munch) Newsgroups: comp.lang.c Subject: Re: HAS ANYONE SEEN THIS BUG? Keywords: turbo C++ Message-ID: <1991Apr16.141117.5065@odin.diku.dk> Date: 16 Apr 91 14:11:17 GMT References: <1991Apr14.215819.16486@allgfx.agi.oz> Sender: news@odin.diku.dk (Netnews System) Organization: Department of Computer Science, U of Copenhagen Lines: 37 cn@allgfx.agi.oz (Con Neri) writes: >Hi netters, > I havec been working with a friend developing some code using >Turbo C++ V1.5 but only writing in standard C. We have been getting an error >with a particular piece of code, namely > fscanf(fp,"%f", &f); > The runtime error is > scanf: floating point formats not linked. > Abnormal Program termination. > Can some one shed some light on what this means? I can compile some > other code with the same statement and yet have no errors. I am > quite confused!! >Hope someone out there can help. [stuff deleted] I experienced the same problem once, using Turbo C 2.0 and trying to link "by hand" instead of having the integrated environment make facility handle all that. The solution was simple: I went back to linking from the integrated environment. Somehow TC/TC++ is trying to be smart, and exclude all the code to handle floating point (by having a scanf version with and one without fp-handling), when the program doesn't use fp arithmetic. The trouble is, as [vsf]scanf and [vsf]printf functions are interpreters of the format string, this may be difficult to detect. Somehow you need to make TC aware that you are dealing with fp. I don't know how TC detects fp use. Perhaps by looking for fp-variable declarations in that module? Or fp math? -- Anders Munch