C ++ keywords and, or, not, xor

Possible duplicate:
Written versions of logical operators.

I noticed that C ++ defines the keyword and , or , not , xor , and_eq , or_eq , not_eq and xor_eq as an alternative to && , || ! , ^ , &= , |= != and |= . and they are rarely used! What's wrong? Aren't they portable?

+47
c ++ operators
Mar 06
source share
1 answer

They come from C AFAIR when it was not known what special characters are on the keyboard. Thus, in order to have a portable language, it was defined so that anyone could use C, even if it used a keyboard without & , | or ^ (etc.).

Currently, when QWERTY is the standard (with AZWERTY and co. As options), this is no longer a problem.

PS. And, of course, for obfuscation code contests;)

+18
Mar 06
source share
— -



All Articles