🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #754

Re: Bug of Turbo C 2.0?

#754
From: Chad Price
Date: Wed, 15 Apr 1992 15:12
44 lines
2304 bytes
zcookbruc@cc.curtin.edu.au writes:

>In article <1992Apr15.045942.9349@ux1.cso.uiuc.edu>, klg0582@uxa.cso.uiuc.edu (Ken-Huang Lin) writes:
>> 
>>   I was writing a program using Turbo C 2.0.  The program seemed to be
>> working.  However, after I moved part of the code into a function, it
>> gave me this run-time error message when the program reached the same
>> code now in the function:
>> 
>> "scanf: floating point formats not linked"
>> 
>>   I downloaded the patch "tc2pat.arc" and applied it.  Only some
>> patches would work.  The file "patfloat.bat", which is supposed to fix
>> "floating point formats not linked" problem, said "Incorrect file or
>> version of program file".  (The compiler is version 2.01.)  Does
>> anyone have any clue?
>> 
>> Ken H. Lin
>> khlin@uiwpls.ece.uiuc.edu

>here's a guess based on sources I've seen of other C libraries:

>Some libraries, because of size problems, don't have atof(), atod(),
>dtoa(), ftoa() in the main C library, instead they have a dummy function
>that says somthing along the lines of "floating point foramts not linked".

>The way to cure this (In the cases I've delt with) is to link in the maths
>library, if possible before the c library (est way to ensure linkage order
>in TC 2 is to use TLINK).

>I personally have never had the problem with any versions of TURBO/BORLAND C
>this may be because I always use TLINK.


I have had and fixed the problem. Get the patch file from Borland. Same file, 
not arc'd. It is on the Borland BBS (or at least it used to be). You will need
your serial number to log onto the BBS.

The problem is in the Borland compliler, which does not link in the floating
point stuff unless a floating point variable is declared and used in the
function. 

chad
price@helios.unl.edu
Technical Details
Message-ID: <price.703350762@helios>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!unlinfo.unl.edu!price
References: <1992Apr15.045942.9349@ux1.cso.uiuc.edu> <1992Apr15.185310.1@cc.curtin.edu.au>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!unlinfo.unl.edu!price
From: price@helios.unl.edu (Chad  Price)
Subject: Re: Bug of Turbo C 2.0?
Message-ID: <price.703350762@helios>
Sender: news@unlinfo.unl.edu
Nntp-Posting-Host: helios.unl.edu
Organization: University of Nebraska - Lincoln
References: <1992Apr15.045942.9349@ux1.cso.uiuc.edu> <1992Apr15.185310.1@cc.curtin.edu.au>
Date: 15 Apr 92 15:12:42 GMT
Lines: 44