Code: Select all
Switch [SwitchValue]
{
Case CaseValue1:
Statements1
Case CaseValue2a, CaseValue2b:
Statements2
Default:
Statements3
}
Code: Select all
Switch 1
{
;Case 1,2: Msgbox("2") ; More than one CaseValue, Err: This line does not contain a recognized action.
;Case 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20: Msgbox("2") ; And more, Err: Function calls require a space or "(". Use comma only between parameters.
;Case (1,2): Msgbox("2") ; Equal to Case 2:
Case 1: Msgbox("1")
}