Switch versus if/then/else ( was: Main menu puzzle, Klaus)

Alex Tweedly alex at tweedly.net
Mon Feb 20 13:48:36 EST 2006


Judy Perry wrote:

>Like using case statements and pwhich's where a simple if-then series will
>do.  ;-)
>
>  
>
I know we can easily re-write the Original Poster's script with a simple 
if-then series.

But if you can rewrite it without a 'pWhich' (or an equivalent 
'theItem', or 'pBasket', or ....) I'll be most impressed.

Yeah, I know we could do
 
   if param(1) = "Quit" then
     ....
   end if

but that hardly counts as simpler ;-)

-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17/02/2006




More information about the use-livecode mailing list