lkml.org 
[lkml]   [2002]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: RFC: booleans and the kernel
From
Date
le ven 25-01-2002 à 12:28, Thomas Hood a écrit :

> In that case, perhaps it would be more perspicuous to define
> a "bit" type rather than a "bool" type, and to use 0 and 1 as
> its values rather than 'true' and 'false'. (A "bit" type
> would have all the advantages mentioned earlier by Peter Anvin
> http://marc.theaimsgroup.com/?l=linux-kernel&m=101191106124169&w=2 .)

in the hypothetical 'bit type' case:

bit n;
n = 2;
printf("n = %d\n", n);

guess what ? n = 0

Xav


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.210 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site