What does !
mean in pseudo-code? I know !
stan开发者_Go百科ds 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?
!=
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 )
精彩评论