From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BckWn-0006ay-LQ for qemu-devel@nongnu.org; Tue, 22 Jun 2004 08:37:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BckWm-0006am-70 for qemu-devel@nongnu.org; Tue, 22 Jun 2004 08:37:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BckWm-0006aj-42 for qemu-devel@nongnu.org; Tue, 22 Jun 2004 08:37:28 -0400 Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BckUw-0004vN-0E for qemu-devel@nongnu.org; Tue, 22 Jun 2004 08:35:34 -0400 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BckUv-000587-00 for ; Tue, 22 Jun 2004 14:35:33 +0200 Received: from dyn-83-157-75-68.ppp.tiscali.fr ([83.157.75.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2004 14:35:32 +0200 Received: from gmane by dyn-83-157-75-68.ppp.tiscali.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2004 14:35:32 +0200 From: "Charlie Gordon" Date: Tue, 22 Jun 2004 14:37:46 +0200 Message-ID: References: <40D6A164.2010109@petig-baender.de><20040621154440.GQ4686@kainx.org> <200406221249.36994.trunks-carracho@planet.nl> Sender: news Subject: [Qemu-devel] Re: Re: completely OT: C Q/As, was Re: security_20040618 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org "Sander Nagtegaal" wrote in message news:200406221249.36994.trunks-carracho@planet.nl... > Something else...............I'm new to C++ ( but this is C code but the same > in C++) so don't shoot me....... I'm just a teaser, not an executionner. > Isn't enum { FALSE=0 , TRUE=1 } compleetly stupid anyway. I mean........is > FALSE=0 then enum will automaticly make TRUE 1 right? So then > enum {FALSE=0 , TRUE } ; would be better right? Well, yes and no. You correctly analyse that the initializer for TRUE is redundant, as a matter of fact both initialisers are useless. So I could have written : enum BOOL { FALSE, TRUE }; or whatever typedef is appropriate. But I prefer to make certain things more explicit. I find it more readable. Not exactly what you call "completely stupid" ! Now if you want to flame something completely stupid, look at this one : #define FALSE 0==1 #define TRUE 1==1 Why will this fail ? Chqrlie.