条件运行语句.
Select
Case <表达式>
语句1
...
[Case <表达式>
语句2
...]
[Case Else
语句N
...]
EndSelect
Case <表达式> | 如果表达式(第一个)为真则执行从下一行开始一直到下一个 Case 或 EndSelect 为止的所有语句.如果有多个Case表达式都成立则只执行第一个Case语句. |
Local $var = 0
Local $var2 = ""
Select
Case $var = 1
MsgBox(0, "", "First Case expression was true")
Case $var2 = "test"
MsgBox(0, "", "Second Case expression was true")
Case Else
MsgBox(0, "", "No preceding case was true!")
EndSelect