Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!texsun!texbell!merch!sneaky!spudge!thorp From: thorp@spudge.UUCP (Don Thorp) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo-C bug Message-ID: <952@spudge.UUCP> Date: 31 May 89 15:54:22 GMT References: <2556@Portia.Stanford.EDU> Reply-To: thorp@spudge.UUCP (Don Thorp) Distribution: na Organization: Friends of Guru Bob Lines: 29 In article <2556@Portia.Stanford.EDU> hobbes@Portia.Stanford.EDU (Andrew Zimmerman) writes: >The following program doesn't run when compiled under Turbo-C 2.0. >(It does compile under Turbo-C, and it runs under Zortech C.) >Does anyone know if you can explicitly tell Turbo-C 2.0 to link in >the floating formats? > #include main() { double a[3][3]; int i; /* ----- Fix for linking in floating point library ----- * _turboFloat() is never called, it forces the FLOAT library to be * linked into the program. */ if (0) _turboFloat(); i = 1; scanf("%lf",&a[i][1]); printf("a[1][1] = %lf\n",a[1][1]); } Try adding the above statement to your code. It should fix the problem. I compiled your program using TC2.0 and it worked, but I've applied a number of patches and one of them could have fixed the problem. Don Thorp