Switch statement

Bill bill at bluewatermaritime.com
Wed Aug 4 14:28:01 EDT 2004


Thanks this worked. I thought you had to use a switch statement because an
if statement could only have one "else". Now I realize a switch/case
statement is only used because it is faster for comparing one item against
other items to match exactly. This is an example of how an old hypercard
programmer can do lots of stuff without really knowing anything about
programming. I do notice that all the runrev processes like this run so fast
it doesn't really matter. The only thing slowing down my program is the
calls to the database and I'm starting to put all those in global containers
to speed things up by just accessing the variables.

> if "ballast" is in Text then
>      put "valuable contraband" into fld "e4"
> else if "bulk" is in Text then
>      put "illegal aliens" into fld "e5"
> else
>      put "go visit Andre in South America" into fld "e6"
> end if






More information about the use-livecode mailing list