🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #761

Re: atof() problem in Turbo C 2.0

#761
From: Hi Ho Silver
Date: Fri, 15 Jun 1990 23:37
20 lines
1595 bytes
In article <1990Jun11.195944.26213@wuphys.wustl.edu> marty@wuphys.UUCP (Marty Olevitch) writes:
$Here is something I've just noticed in using the atof() library routine in
$Turbo C 2.0. When the following test program is compiled with the "-DWEIRD"
$option, the correct answer is printed. However, when "WEIRD" is not
$#defined, the error message "scanf : floating point formats not linked" is
$printed at runtime. Does the compilation of the sscanf() load in some other
$code needed for atof()? If so, how do I get this code loaded without the
$dummy call to sscanf() (which in the example is never executed).

   I believe the usual solution to this is to include a line of the form

	exp (1);

in your code (any floating-point math call will do).  This forces the
floating point code to be linked in.
-- 
   /Nikebo \ Nikebo says "Nikebo knows how to post.  Just do it."\silver@xrtll/
  /---------\_____________________________________________________\----------/
 /yunexus!xrtll!silver (L, not 1)\ Hi Ho Silver \   just silver for short   /
/Silver:  Ever Searching for SNTF \  Life sucks. \  someone buy me a BEER! /
Technical Details
Message-ID: <1990Jun15.233714.13454@xrtll.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!xrtll!silver
References: <1990Jun11.195944.26213@wuphys.wustl.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!xrtll!silver
From: silver@xrtll.uucp (Hi Ho Silver)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: atof() problem in Turbo C 2.0
Message-ID: <1990Jun15.233714.13454@xrtll.uucp>
Date: 15 Jun 90 23:37:14 GMT
References: <1990Jun11.195944.26213@wuphys.wustl.edu>
Reply-To: silver@xrtll.UUCP (Hi Ho Silver)
Organization: Not around here, pal!
Lines: 20