What does !
mean in pseudo-code? I know !
stands for factorial but I can't translate it .
ex:
get operation
if (operation!= ’B’ OR operation != ’D’ OR operation!= ’W’) then
print "Invalid Operation"
What does it mean?
What does !
mean in pseudo-code? I know !
stands for factorial but I can't translate it .
ex:
get operation
if (operation!= ’B’ OR operation != ’D’ OR operation!= ’W’) then
print "Invalid Operation"
What does it mean?
Share Improve this question edited Aug 16, 2019 at 23:03 S.S. Anne 15.6k8 gold badges41 silver badges81 bronze badges asked Mar 16, 2010 at 22:56 DinaDina 5751 gold badge5 silver badges6 bronze badges 1- Interesting (stackoverflow.com/questions/2304809/…) :-) – Buhake Sindi Commented Mar 16, 2010 at 23:24
3 Answers
Reset to default 6!=
means not equal and !
generally means not or negation.
It means "not". So your example code
if (operation!= ’B’ OR operation != ’D’ OR operation!= ’W’)
can be read as
"If operation does not equal 'B' or operation does not equal 'D' or operation does not equal 'W'"
In general,
!
means not
||
meanslogical
or
&&
meanslogical
and
Example:
!false == true ( == means equality )