Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!rti!sunpix!matthew From: matthew@sunpix.UUCP ( Sun Visualization Products) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo-C bug Message-ID: <630@greens.UUCP> Date: 31 May 89 14:17:16 GMT References: <2556@Portia.Stanford.EDU> Distribution: na Organization: Sun Microsystems, Research Triangle Park, NC Lines: 24 I'm was taking a "C" programmers course at a local community college, and your trouble sounds like a problem we (my class) were having using 'scanf' under Turbo-C version 2.0. Heres the fix we received (near verbatium): ~The fix is to include a call to any function (including 'scanf') and pass ~the address of a simple float as a parameter. Add the following lines to ~your program. ~ ~static void bogus(void) /* dummy routine to fix TC-2.0 float problem */ ~ { /* DO NOT CALL THIS FUNCTION!!!!!!!!!!!!!!!! */ ~ float f; ~ scanf(&f); ~ } I also remember reading that the problem had to do with referencing '_turbofloat', or something like that. -- Matthew Lee Stier | Sun Microsystems --- RTP, NC 27709-3447 | "Wisconsin Escapee" uucp: { sun, mcnc!rti }!sunpix!matthew | phone: (919) 469-8300 fax: (919) 460-8355 |