X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <20020505034134.87212.qmail@web11306.mail.yahoo.com> Date: Sat, 4 May 2002 20:41:34 -0700 (PDT) From: PEDRO IZECKSOHN Subject: Re: To Myself Re: Can double negations get optimized out? To: djgpp AT delorie DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Reply-To: djgpp AT delorie DOT com YES GUYS, I AM A STUPID. I AM A DRUNK WITHOUT DRINKING !!! The correct would be: printf("%d",b); Sorry from bothering you all. --- PEDRO IZECKSOHN wrote: > From PEDRO IZECKSOHN Sat May 4 20:14:39 2002 > Date: Sat, 4 May 2002 20:14:39 -0700 (PDT) > From: PEDRO IZECKSOHN > Subject: Re: Can double negations get optimized out? > To: djgpp AT delorie DOT com > Reply-to: djgpp AT delorie DOT com > > Sorry if I'm a stupid, but I can't understand the > effects of the suggestions of Martin, Eli, && the first > suggestion of DJ. Bellow are the full codes that I made > for > testing them. Maybe that people are writing and sending, > like I myself do sometimes, without testing the code > before? > > #include > int main () { > int a,b; > //... > while (1) { > scanf("%d",&a); > b = !!a; > printf("%d",a); > printf("%s"," > "); > } // Ends while. > //... > return 0; > } > > #include > int main () { > int a,b; > //... > while (1) { > scanf("%d",&a); > b = a != 0; > printf("%d",a); > printf("%s"," > "); > } // Ends while. > //... > return 0; > } > > #include > int main () { > int a,b; > //... > while (1) { > scanf("%d",&a); > b = a ? 1 : 0; > printf("%d",a); > printf("%s"," > "); > } // Ends while. > //... > return 0; > } > __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com