3 ms·
Related to trigraphs are the alternative logical operator keywords like `and` and `or`. I'm surprised people don't use them more often because they're nicer to
by cpeterso 7y ago
Related to trigraphs are the alternative logical operator keywords like `and` and `or`. I'm surprised people don't use them more often because they're nicer to read than && and ||. In C, you must #include <iso646.h> but I think they're standard keywords.
C++ code example on Godbolt: https://godbolt.org/z/ED6tXK https://godbolt.org/z/ED6tXK
https://en.cppreference.com/w/cpp/language/operator_alternative https://en.cppreference.com/w/cpp/language/operator_alternat...
- paulrpotts 7y agoHmmm... I would not prefer using "and" and "or" because that syntactic sugar obscures whether the bitwise or logical operations are intended. You get really used to reading && and || as "and" and "or" in your head after the first two decades of C programming : )
- jandrese 7y agoI can safely say that I have never #included iso646.h in my life.