delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/01/08/23:45:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Samuel Lauber" <sam124 AT operamail DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <NsLDd.54447$nP1 DOT 27785 AT twister DOT socal DOT rr DOT com> <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> <MKYDd.54517$nP1 DOT 10666 AT twister DOT socal DOT rr DOT com> <41E08DBF DOT AFC9C49A AT yahoo DOT com>
Subject: Re: Strange problems with printf()
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <IE2Ed.54679$nP1.52643@twister.socal.rr.com>
Date: Sun, 09 Jan 2005 04:44:24 GMT
NNTP-Posting-Host: 204.210.96.202
X-Complaints-To: abuse AT rr DOT com
X-Trace: twister.socal.rr.com 1105245864 204.210.96.202 (Sat, 08 Jan 2005 20:44:24 PST)
NNTP-Posting-Date: Sat, 08 Jan 2005 20:44:24 PST
Organization: RoadRunner - West
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> And what happens when you replace that snarky printf declaration
> with the correct "#include <stdio.h>"?
>
The exact same thing! In fact, I first noticed this in a build of Perl
5.8.6.
Modified code:

#include <stdio.h>

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:

$ ./test
Unnormal
$ ./test
Unnormal
$ ./test
Unnormal
$ ./test
5.860000000
$ ./test
(repeated around 10 more times)
$ ./test
Unnormal
...

Samuel Lauber


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019