Xref: utzoo comp.sys.ibm.pc:44231 alt.msdos.programmer:1219 Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!psuvax1!psuvm!cmh117 From: CMH117@psuvm.psu.edu (Charles Hannum) Newsgroups: comp.sys.ibm.pc,alt.msdos.programmer Subject: Re: scanf problem in TC v2.01. Message-ID: <90043.093434CMH117@PSUVM.BITNET> Date: 12 Feb 90 14:34:34 GMT References: <7192.25d1e107@dit.ie> <25D4D935.3073@maccs.dcss.mcmaster.ca> Organization: Penn State University Lines: 31 In article <25D4D935.3073@maccs.dcss.mcmaster.ca>, cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) says: > >In article <7192.25d1e107@dit.ie> alawlor@dit.ie (Aengus Lawlor) writes: >$I'm having a problem using scanf in Turbo C 2.01. >$When I have the code >$ fscanf(f,"%f",x); >$it compiles and links fine, but at run time I get >$ scanf : floating point formats not linked >$Abnormal program termination > > I've had problems with scanf under TCC 2.0. Given something like >scanf ("%f", &floatvariable); >it will read the keyboard but return garbage (sometimes 0, sometimes NAN, >sometimes other values). atof is the cause of this problem; I've >tried >scanf ("%s", stringvariable); floatvariable = atof (stringvariable); >and it has the same problem (not surprising, since scanf calls atof >to handle floating point quantities). Please, people! If you're going to post bug reports, please give SPECIFIC EXAMPLES so us hackers can trace down the offending bug and obliterate it! Generalized statements like this ARE NOT HELPFUL! Virtually, - Charles Martin Hannum II "Klein bottle for sale ... inquire within." (That's Charles to you!) "To life immortal!" cmh117@psuvm.{bitnet,psu.edu} "No noozzzz izzz netzzzsnoozzzzz..." c9h@psuecl.{bitnet,psu.edu} "Mem'ry, all alone in the moonlight ..."