편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
6번째 줄: | 6번째 줄: | ||
==Bash== | ==Bash== | ||
[[category: Bash]] | [[category: Bash]] | ||
< | <source lang='bash'> | ||
A=1 | A=1 | ||
echo $((A^1)) | echo $((A^1)) | ||
# 0 | # 0 | ||
</ | </source> | ||
< | <source lang='bash'> | ||
B=0 | B=0 | ||
echo $((B^1)) | echo $((B^1)) | ||
# 1 | # 1 | ||
</ | </source> | ||
==Python== | ==Python== | ||
[[category: Python]] | [[category: Python]] | ||
< | <source lang='Python'> | ||
print( not True ) | print( not True ) | ||
print( not False ) | print( not False ) | ||
# False | # False | ||
# True | # True | ||
</ | </source> | ||
==Ruby== | ==Ruby== | ||
[[category: Ruby]] | [[category: Ruby]] | ||
< | <source lang='Ruby'> | ||
puts !true | puts !true | ||
# false | # false | ||
puts !false | puts !false | ||
# true | # true | ||
</ | </source> | ||
==같이 보기== | ==같이 보기== | ||
*[[and]] | *[[and]] |