🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #42140

Re: scanf problem in TC v2.01.

#42140
From: Stephen M. Dunn
Date: Sun, 11 Feb 1990 03:17
26 lines
1721 bytes
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).

$Aengus Lawlor    Dept of Computer Science.           Time flies like an arrow,
$ALAWLOR@DIT.IE   Dublin Institute of Technology.     Fruit-flies like a banana
$                 Kevin Street. Dublin 8. Ireland.   
   And time flies when you're having fun.
-- 
Stephen M. Dunn                               cs4g6ag@maccs.dcss.mcmaster.ca
          <std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
****************************************************************************
               I Think I'm Going Bald - Caress of Steel, Rush
Technical Details
Message-ID: <25D4D935.3073@maccs.dcss.mcmaster.ca>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!geac!maccs!cs4g6ag
References: <7192.25d1e107@dit.ie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!geac!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: <25D4D935.3073@maccs.dcss.mcmaster.ca>
Date: 11 Feb 90 03:17:09 GMT
References: <7192.25d1e107@dit.ie>
Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn)
Organization: McMaster University, Hamilton, Ontario
Lines: 26