for me a great advantage of SWITCH is the opportunity for fast and
easy multiple if statements done this way instead:
SWITCH pKey
CASE "B"
CASE return
CASE "P"
printThePage
default
doDefaultThing
END SWITCH
easy to read, easy to write.
I haven't timed it - but if it's read by the engine in the same
manner other programming languages handle it then it would be faster
as any subsequent conditions are skipped because once the case
statement (switch statement) is met the compiler knows not to
proceed - as opposed to if/then/else etc where the entire handler is
evaluated in full.
Scott Kane
--
stephen barncard
s a n f r a n c i s c o
- - - - - - - - - - - -
_______________________________________________
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