home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!ucivax!news.service.uci.edu!beckman.com!dn66!a_rubin
- Newsgroups: comp.lang.c
- Subject: Re: MS-C fread bug
- Message-ID: <a_rubin.715550662@dn66>
- From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin)
- Date: 3 Sep 92 20:04:22 GMT
- References: <1992Sep3.141100.28778@wuecl.wustl.edu>
- Nntp-Posting-Host: dn66.dse.beckman.com
- Lines: 26
-
- In <1992Sep3.141100.28778@wuecl.wustl.edu> drm4005@wuee1.wustl.edu (David Russell Maffitt) writes:
-
- >Here is a simple piece of code that does not work under MS-C versions 6.0 or
- >7.0. WHY? Just save the file as main.c and compile with "cl main.c".
-
- >What is magic about the value 70.689651??? This works fine if I change
- >the value slightly (70.689600 works but 70.689650 does not). Is this a
- >horrible bug or do I have more brain damage than I realize??
- >I'd appreciate a sanity check. I'd like to hear how this runs on similar
- >and different hardware with the Microsoft compiler.
-
- >----- start file main.c --------------------------------------------------
- >#include <stdio.h>
-
- >#define MAGIC 70.689651
-
- (rest of code ommitted)
-
- MAGIC has a byte which has the value 0x1A, which is processed as an end of
- file by MS-DOS. If you open fp2 in mode "rb" instead of "r", there is no
- problem.
- --
- Arthur L. Rubin: a_rubin@dsg4.dse.beckman.com (work) Beckman Instruments/Brea
- 216-5888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal)
- My opinions are my own, and do not represent those of my employer.
- My interaction with our news system is unstable; please mail anything important.
-