www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/04/23:15:11

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <20020505031439.44308.qmail@web11304.mail.yahoo.com>
Date: Sat, 4 May 2002 20:14:39 -0700 (PDT)
From: PEDRO IZECKSOHN <izecksohn AT yahoo DOT com>
Subject: Re: Can double negations get optimized out?
To: djgpp AT delorie DOT com
In-Reply-To: <200205041634.g44GYOT31374@delorie.com>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv 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 <stdio.h>
int main () {
int a,b;
//...
while (1) {
scanf("%d",&a);
b = !!a;
printf("%d",a);
printf("%s","
");
} // Ends while.
//...
return 0;
}

#include <stdio.h>
int main () {
int a,b;
//...
while (1) {
scanf("%d",&a);
b = a != 0;
printf("%d",a);
printf("%s","
");
} // Ends while.
//...
return 0;
}

#include <stdio.h>
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

- Raw text -


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