Hi everyone,

Does switch is able to bring more flexibility and readability than if/ then/else?
The answer is yes.

You can write:

switch
  case x < 100
  case  x > 500
  case  x > 200 and x < 400
    <statements>
    break
  default
    <other statements>
end switch

With a conditional structure you would write:

if x < 100 or x > 500 or (x > 200 and x < 400) then
  <statements>
else
 <other statements>
end if

The first formulation seems much more clear to me :-)

Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------ ----------------------
http://www.sosmartsoftware.com/    [EMAIL PROTECTED]/


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to