You can combine boolean expressions with a comma delimiter. I saw this in code, and I'm not sure if this solves. I wrote some code examples.
int BoolStatement(void) { using std::cout; using std::endl; cout << "(0, 0) => " << (0, 0) << endl; cout << "(0, 1) => " << (0, 1) << endl; cout << "(1, 0) => " << (1, 0) << endl; cout << "(1, 1) => " << (1, 1) << endl; cout << "(0, 0) => " << (0, 0) << endl; cout << "(0, 3) => " << (0, 3) << endl; cout << "(5, 0) => " << (5, 0) << endl; cout << "(7, 1) => " << (7, 1) << endl; cout << endl; return 0; }
The result of this:
(0, 0) => 0 (0, 1) => 1 (1, 0) => 0 (1, 1) => 1 (0, 0) => 0 (0, 3) => 3 (5, 0) => 0 (7, 1) => 1
I am not sure if this is true only for my system, and if this call actually matches a logical combination of operators.
What is the output signal, is it the same in all systems? Why is this statement possible and is there documentation on it?
source share