Exit Switch or break switch question
Thomas McGrath III
3mcgrath at comcast.net
Thu Mar 20 11:06:09 EDT 2008
If I want to leave a switch statement after successfully matching a
case is it better to break and rund to the end without a default
statement or to exit the switch from that case?
ComboBox
on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
exit switch
case "Work"
-- code goes here
exit switch
end switch
end menuPick
OR
on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
break
case "Work"
-- code goes here
break
end switch
end menuPick
Thank you,
Tom McGrath
More information about the use-livecode
mailing list