Exit Switch or break switch question

Eric Chatonet eric.chatonet at sosmartsoftware.com
Thu Mar 20 11:11:27 EDT 2008


Hi Tom,

Break skips the rest of the current switch structure and goes to the  
statement following the end switch.
Only four chars to write ;-)

Le 20 mars 08 à 16:06, Thomas McGrath III a écrit :
> 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

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the Use-livecode mailing list