Re: !!, what is it?
- From: cafer@xxxxxxxxx (Cafer Şimşek)
- Date: Sun, 11 Sep 2005 19:14:22 +0300
"Mike Wahler" <mkwahler@xxxxxxxxxxxx> writes:
[...]
> No, ! is an operator. It's result is always either zero or one.
^^^^^^^^^^^^
I think, C standarts says something about logical operations resusts;
if the result is false, it's value is 0 (zero). if the result is true,
it's value is non-zero (like -2, -1, 2, 3, ...). So, it must NOT be
one. This difference has seen according to compiler or target
platform.
For example; some compiler's headers provide TRUE and FALSE constants
like that;
#define FALSE 0
#define TRUE !FALSE
// or
#define TRUE (0==0)
#define FALSE !TRUE
[...]
Best Regards.
--
Cafer Şimşek
http://cafer.org
.
- Follow-Ups:
- Re: !!, what is it?
- From: Flash Gordon
- Re: !!, what is it?
- From: Keith Thompson
- Re: (corr) !!, what is it?
- From: Cafer Şimşek
- Re: !!, what is it?
- References:
- !!, what is it?
- From: bjk of course
- Re: !!, what is it?
- From: Mike Wahler
- !!, what is it?
- Prev by Date: Re: Problems about conditional compilation
- Next by Date: Re: (corr) !!, what is it?
- Previous by thread: Re: (corr) !!, what is it?
- Next by thread: Re: (corr) !!, what is it?
- Index(es):
Relevant Pages
|