X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <41E0BDAB.1F112624@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Strange problems with printf() References: <01c4f56a$Blat.v2.2.2$ecce5460 AT zahav DOT net DOT il> <6_TDd.54474$nP1 DOT 27946 AT twister DOT socal DOT rr DOT com> <01c4f5be$Blat.v2.2.2$9e630f60 AT zahav DOT net DOT il> <41E08DBF DOT AFC9C49A AT yahoo DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 33 Date: Sun, 09 Jan 2005 09:04:47 GMT NNTP-Posting-Host: 12.76.141.29 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1105261487 12.76.141.29 (Sun, 09 Jan 2005 09:04:47 GMT) NNTP-Posting-Date: Sun, 09 Jan 2005 09:04:47 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Samuel Lauber wrote: > >> And what happens when you replace that snarky printf declaration >> with the correct "#include "? >> > The exact same thing! In fact, I first noticed this in a build of > Perl 5.8.6. Modified code: > > #include > > int main(void) > { > printf("%f\n", 5.86); > return 0; > } > > Did the same thing. As long as printf is declared, and the number is not > 0.0, it displays `Unnormal'. But somehow, it seems it does it in a pattern: Could it have something to do with the use of "test" as a program name? I simply compiled "gcc junk.c" and then executed a, and all works correctly. Using gcc 3.2.1 here, under W98. c:\c\junk>gcc junk.c c:\c\junk>a 5.860000 -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!