편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
1번째 줄: | 1번째 줄: | ||
{{lowercase title}} | {{lowercase title}} | ||
==Bash== | ==Bash== | ||
[[ | [[category: Bash]] | ||
<source lang='bash'> | |||
< | |||
He="John Smith" | He="John Smith" | ||
if [ "$He" = "John Smith" ] | if [ "$He" = "John Smith" ] | ||
then | |||
echo "He is John Smith" | echo "He is John Smith" | ||
else | else | ||
13번째 줄: | 12번째 줄: | ||
fi | fi | ||
# He is John Smith | # He is John Smith | ||
</ | </source> | ||
== | ==Cmd== | ||
[[category: Cmd]] | |||
<source lang='bash'> | |||
[[ | |||
< | |||
set my_name=John Smith | set my_name=John Smith | ||
IF "%my_name%"=="John Smith" ECHO my_name is John Smith | IF "%my_name%"=="John Smith" ECHO my_name is John Smith | ||
</ | </source> | ||
==PHP== | ==PHP== | ||
[[ | [[category: PHP]] | ||
<source lang='php'> | |||
< | |||
if(43>42) { | if(43>42) { | ||
echo('hello'); | echo('hello'); | ||
67번째 줄: | 29번째 줄: | ||
} | } | ||
// helloworld | // helloworld | ||
</ | </source> | ||
< | <source lang='php'> | ||
if(43>42) echo('hello'); | if(43>42) echo('hello'); | ||
// hello | // hello | ||
</ | </source> | ||
==Python== | ==Python== | ||
[[ | [[category: python]] | ||
<source lang='python'> | |||
< | |||
if 43 > 42: | if 43 > 42: | ||
print('hello') | print('hello') | ||
print('world') | print('world') | ||
</ | # hello | ||
< | # world | ||
</source> | |||
<source lang='python'> | |||
if 43 > 42: print ('hello') | if 43 > 42: print ('hello') | ||
# hello | # hello | ||
</source> | |||
</ | |||
== | ==See also== | ||
* [[ | *[[else]] | ||
* [[else if | *[[else if]] | ||
*[[true]] | |||
*[[while]] | |||
* [[true]] | *[[for]] | ||
* [[while]] | *[[==]] | ||
* [[for]] | |||
* [[== | |||