Xref: utzoo comp.sys.ibm.pc:44333 alt.msdos.programmer:1235 Path: utzoo!utgpu!jarvis.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!maccs!cs4g6ag From: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc,alt.msdos.programmer Subject: Re: scanf problem in TC v2.01. Message-ID: <25D8649A.24584@maccs.dcss.mcmaster.ca> Date: 13 Feb 90 19:48:41 GMT References: <7192.25d1e107@dit.ie> <25D4D935.3073@maccs.dcss.mcmaster.ca> <90043.093434CMH117@PSUVM.BITNET> Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Organization: McMaster University, Hamilton, Ontario Lines: 25 In article <90043.093434CMH117@PSUVM.BITNET> CMH117@psuvm.psu.edu (Charles Hannum) writes: $In article <25D4D935.3073@maccs.dcss.mcmaster.ca>, $cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) says: $> 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! Uh ... other than filling in the name of your favourite floating point variable, that's pretty specific. If the memory model matters, I've only tried it in the small model. Floating point array elements or scalars have the same problem. -- Stephen M. Dunn cs4g6ag@maccs.dcss.mcmaster.ca = "\nI'm only an undergraduate!!!\n"; **************************************************************************** I Think I'm Going Bald - Caress of Steel, Rush