조건문: 두 판 사이의 차이

내용 삭제됨 내용 추가됨
편집 요약 없음
TedBot (토론 | 기여)
잔글 봇: 틀 이름 및 스타일 정리
81번째 줄:
</syntaxhighlight>
|<syntaxhighlight lang="bash">
case $someChar in
a) actionOnA; ;;
x) actionOnX; ;;
139번째 줄:
| {{yes}}
| {{yes}}
| {{yes|[[switch 문|예]]}}
| {{no}}
| {{no}}
175번째 줄:
| {{yes}}
|-
|{{rh}}| [[자바 (프로그래밍 언어)|자바]]
| {{yes}}
| {{yes}}
303번째 줄:
<li> {{note label|choice else if|B|1}} {{note label|choice else if|B|2}} {{note label|choice else if|B|3}} {{note label|choice else if|B|4}} {{note label|choice else if|B|5}}The often-encountered <code>else if</code> in the C family of languages, and in COBOL and Haskell, is not a language feature but a set of nested and independent ''if then else'' statements combined with a particular source code layout. However, this also means that a distinct else–if construct is not really needed in these languages.</li>
<li> {{note label|choice const|C|1}} {{note label|choice const|C|2}} In Haskell and F#, a separate constant choice construct is unneeded, because the same task can be done with pattern matching.</li>
<li> {{note label|case regexp|D|none}} In a Ruby <code>case</code> construct, [[정규 표현식|regular expression]] matching is among the conditional flow-control alternatives available. For an example, see [http://stackoverflow.com/questions/6803647/how-to-write-a-ruby-switch-statement-case-when-with-regex-and-backreferences this] Stack Overflow question.</li>
<li> {{note label|SQL|S|1}}{{note label|SQL|S|2}} SQL has two similar constructs that fulfill both roles, both introduced in [[SQL-92]]. A "searched <code>CASE</code>" expression <code>CASE WHEN cond1 THEN expr1 WHEN cond2 THEN expr2 [...] ELSE exprDflt END</code> works like <code>if ... else if ... else</code>, whereas a "simple <code>CASE</code>" expression: <code>CASE expr WHEN val1 THEN expr1 [...] ELSE exprDflt END</code> works like a switch statement. For details and examples see [[Case (SQL)]].</li>
</small>
311번째 줄:
 
== 바깥 고리 ==
* {{언어고리언어링크|en}} [http://everythingfla.com/courses/video/8/69/ IF NOT (ActionScript 3.0)] video
 
{{토막글|프로그래밍 언어}}