"If"의 두 판 사이의 차이

(새 문서: {{lowercase title}} ==Bash== category: Bash <source lang='bash'> He="John Smith" if [ "$He" = "John Smith" ] then echo "He is John Smith" else echo "He is not John Smith" fi # ...)
 
16번째 줄: 16번째 줄:
==Cmd==
==Cmd==
[[category: Cmd]]
[[category: Cmd]]
<source lang='dos'>
<source lang='bash'>
set my_name=John Smith&rem
set my_name=John Smith&rem
IF "%my_name%"=="John Smith" ECHO my_name is John Smith
IF "%my_name%"=="John Smith" ECHO my_name is John Smith

2013년 12월 7일 (토) 01:16 판

1 Bash

He="John Smith"
if [ "$He" = "John Smith" ]
then
	echo "He is John Smith"
else
	echo "He is not John Smith"
fi
# He is John Smith

2 Cmd

set my_name=John Smith&rem
IF "%my_name%"=="John Smith" ECHO my_name is John Smith

3 PHP

if(43>42) {
	echo('hello');
	echo('world');
}
// helloworld
if(43>42) echo('hello');
// hello

4 Python

if 43 > 42:
	print('hello')
	print('world')
# hello
# world
if 43 > 42: print ('hello')
# hello

5 See also

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}