Recently, I wrote: >> if c < t1 then >> do1 >> else if c >= t1 and c < t2 then >> do2 >> else if c >= t2 and c < t3 then >> do3 >> ... >> else if c >= t7 then >> do8 >> end if >> >> Anyone any ideas? I seem to have a "writer's block" :( > > You could try switch: > > switch > case c < t1 > do1 > case c < t2 > do2 > case c < t3 > do3 > ... > case c < t8 > do8 > end switch > > Note there are no breaks between case statements so the script should run > through all options until it finds a valid equation.
Doh -- ignore the "breaks" comment above (not sure why I left them out -- fatigue?). Include the breaks to prevent the script from returning multiple true statements (unless you want multiple true statements). switch case c < t1 do1 break case c < t2 do2 break case c < t3 do3 break ... case c < t8 do8 end switch Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design ----- E: [EMAIL PROTECTED] W: http://www.tactilemedia.com _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
