More bugs found in OS code

bearophile bearophileHUGS at lycos.com
Wed Nov 2 20:49:04 PDT 2011


Andrej Mitrovic:

> Personally I like using this for a sort of on/off switch:
> bool val;
> // ..
> val ^= 1;
> 
> Maybe that's just stupid but I'm kind of used to it, lol. :p

I use this, I think it's more explicit (but you have to state the variable name two times):

val = !val;

Bye,
bearophile


More information about the Digitalmars-d mailing list