[comp.os.msdos.programmer] scanf bug in TC

vernon@blueeyes.kines.uiuc.edu (vernon) (03/04/91)

Using Turbo C I have recently encountered the error message

scanf: floating point formats not linked
abnormal program termination

I have been informed that this is a bug in TC, but that  there is kludge
to overcome the problem.  Anyone happen to know what that kludge is please?
-- 
	Vernon McDonald  (vmcdonald@uiuc.edu)
	Department of Kinesiology, University of Illinois, Urbana, IL, 61801

tporczyk@na.excelan.com (Tony Porczyk) (03/06/91)

The News Manager)
Nntp-Posting-Host: na
Reply-To: tporczyk@na.excelan.com (Tony Porczyk)
Organization: Standard Disclaimer
References: <1991Mar4.152035.13078@ux1.cso.uiuc.edu>
Distribution: usa
Date: Mon, 4 Mar 1991 19:09:46 GMT

In article <1991Mar4.152035.13078@ux1.cso.uiuc.edu> vernon@blueeyes.kines.uiuc.edu (vernon) writes:
>scanf: floating point formats not linked
>abnormal program termination
>I have been informed that this is a bug in TC, but that  there is kludge

Bug? Kludge? Before we get into that - did you #include<proper.header)?

Tony
<as in "Organization" - see above>

big@vlsi.polymtl.ca (Patrick Drolet) (03/09/91)

In article <1991Mar4.190946.26628@novell.com> tporczyk@na.excelan.com (Tony Porczyk) writes:
>The News Manager)
>Nntp-Posting-Host: na
>Reply-To: tporczyk@na.excelan.com (Tony Porczyk)
>Organization: Standard Disclaimer
>References: <1991Mar4.152035.13078@ux1.cso.uiuc.edu>
>Distribution: usa
>Date: Mon, 4 Mar 1991 19:09:46 GMT
>
>In article <1991Mar4.152035.13078@ux1.cso.uiuc.edu> vernon@blueeyes.kines.uiuc.edu (vernon) writes:
>>scanf: floating point formats not linked
>>abnormal program termination
>>I have been informed that this is a bug in TC, but that  there is kludge
>
>Bug? Kludge? Before we get into that - did you #include<proper.header)?
>
>Tony
><as in "Organization" - see above>
>
Ok, a friend of mine had a similar bug using atof().  He fixed it using a
dumb procedure (that he even never called!) so the linker would not forget
to link everything needed on floats...

procedure is the following:

	float linkfloat( float *f1 )
	{
		float f2 = *f1;
		linkfloat(*f2);
		return 0.0;
	}

He told me that he got this information from Borland tech support...

MAKE SURE SUCH PROCEDUREIS IN YOUR CODE BUT DO NOT CALL IT!!!!
Using a float address, it tells the linker to link floating stuff.


					Patrick Drolet
					big@info.polymtl.ca
>