If this is true, !(1 && !(0 || 1)) why exactly?
Can anyone explain how this is to be read?
This is a discussion on !(1 && !(0 || 1)) Help within the C++ Programming forums, part of the General Programming Boards category; If this is true, !(1 && !(0 || 1)) why exactly? Can anyone explain how this is to be read?...
If this is true, !(1 && !(0 || 1)) why exactly?
Can anyone explain how this is to be read?
0 || 1
!(0 || 1)
1 && !(0 || 1)
!(1 && !(0 || 1))
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
actually, go from left to right. parentheses do not change the direction AND operates in, but parentheses can still effect evaluation of either side:
Code:int * p = 0; if ( !( p && !( *p || 0 ) ) ) printf ( "citizen is right: p == %p\n", ( void * )p );
Last edited by King Mir; 02-20-2008 at 10:25 PM. Reason: changed it to be true to order of evaluation.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.