Log in

View Full Version : Operators that can replicate functions


hammka
Sep 15, 2009, 05:54 PM
What other operator besides #, can successfully replicate the functions "AND", "OR", and "NOT"?

Perito
Sep 16, 2009, 07:32 AM
Are you talking about a computer language?

akotoh
Sep 20, 2009, 07:07 AM
In creating a program,
'and' is the same as '&&'
'or' is the same as '||'
'not' is the same as '!'

As far as I know, they are called as the LOGICAL OPERATORS. :)

jcaron2
Sep 21, 2009, 08:00 AM
As Perito pointed out, the answer to that question completely depends on what language you're talking about. Examples: C/C++, Java, Matlab, Fortran, Pascal, etc.

The examples you gave are consistent with C, and as far as I know those are the only logical operators except in the case of bitwise operations where you have ~ (not), & (and), | (or), and ^ (xor).