Xref: utzoo comp.lang.c:26415 comp.sys.ibm.pc.programmer:181 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!srt From: srt@maui.cs.ucla.edu (Scott Turner) Newsgroups: comp.lang.c,comp.sys.ibm.pc.programmer Subject: Re: Floating Point Formates Keywords: scanf, atof, floating point Message-ID: <32397@shemp.CS.UCLA.EDU> Date: 1 Mar 90 01:01:08 GMT References: <1990Feb28.210122.24511@xenitec.on.ca> Sender: news@CS.UCLA.EDU Reply-To: srt@maui.UUCP (Scott Turner) Distribution: na Organization: UCLA Computer Science Department Lines: 22 In article <1990Feb28.210122.24511@xenitec.on.ca> timk@xenitec.UUCP (Tim Kuehn) writes: >I'm working on a program and am having a problem with the atof() function. >Every time I run it with a certain option turned on I get an error: >scanf : floating point formats not linked. In the future, you should say what compiler you're using, what machine, etc. Fortunately this problem is so common that it isn't necessary. The problem is that TurboC doesn't link in the floating point lib unless it thinks it is needed. And basically TurboC thinks it will be needed if it sees a floating point function being used. So to force TurboC to link in the floating point library, put the pointless line: (void) exp(1.0); somewhere in your code. That should do it. Scott R. Turner UCLA Computer Science "It's so bad it's not even wrong" Domain: srt@cs.ucla.edu UUCP: ...!{cepu,ihnp4,trwspp,ucbvax}!ucla-cs!srt