Another way to set a variable to 1 ?
-
From a system (written in C++) I have to maintain:
nRet = (!0);
should I say something else about it?
-
Could have been worse - it might have been: !-0
-
I suspect the programmer was writing something that was required to "return non-zero", and decided to take that literally. (The variable name suggests it's a return value, otherwise that's possibly another WTF in itself)
-
1?
Doesn't it set the variable to -1?
-
-