[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: Re: completely OT: C Q/As, was Re: security_20040618
From: |
Charlie Gordon |
Subject: |
[Qemu-devel] Re: Re: completely OT: C Q/As, was Re: security_20040618 |
Date: |
Tue, 22 Jun 2004 14:37:46 +0200 |
"Sander Nagtegaal" <address@hidden> wrote in message
news:address@hidden
> 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.
- [Qemu-devel] Re: [PATCH] security_20040618, (continued)
- [Qemu-devel] Re: [PATCH] security_20040618, Charlie Gordon, 2004/06/20
- Re: [Qemu-devel] Re: [PATCH] security_20040618, Tim, 2004/06/20
- [Qemu-devel] Re: Re: [PATCH] security_20040618, Charlie Gordon, 2004/06/20
- Re: [Qemu-devel] Re: Re: [PATCH] security_20040618, Tim, 2004/06/20
- OT: C Q/As, was Re: [Qemu-devel] security_20040618, Christof Petig, 2004/06/21
- [Qemu-devel] OT: C Q/As, was Re: security_20040618, Charlie Gordon, 2004/06/21
- Re: [Qemu-devel] OT: C Q/As, was Re: security_20040618, Christof Petig, 2004/06/21
- Re: OT: C Q/As, was Re: [Qemu-devel] security_20040618, Michael Jennings, 2004/06/21
- [Qemu-devel] Re: completely OT: C Q/As, was Re: security_20040618, Charlie Gordon, 2004/06/22
- Re: [Qemu-devel] Re: completely OT: C Q/As, was Re: security_20040618, Sander Nagtegaal, 2004/06/22
- [Qemu-devel] Re: Re: completely OT: C Q/As, was Re: security_20040618,
Charlie Gordon <=
- Re: [Qemu-devel] Re: completely OT: C Q/As, Michael Jennings, 2004/06/22
- [Qemu-devel] Re: Re: completely OT: C Q/As : let's feed the troll, Charlie Gordon, 2004/06/24