If statements vs case

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Feb 27 16:53:25 EST 2007


Hershel,

There is an example of this in the docs:

   switch (the number of this card)
     case 1
     case (the number of cards)
       -- both the above case conditions execute the following
       -- statements:
       beep
       break
     default
       go next card
   end switch

"Default" is equal to "else" without another "if".

Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz


> Ok we got it, Now the question arises how is it in the "case"  
> statements to
> write an "else" without a following "if"
>
> Switch tS
>  case "a"
>  do a
>  break
> '''Else'''
> Do b
> End switch
>
> Thanks, to all Hershel
>



More information about the use-livecode mailing list