At 01:02 PM 1/31/2015, Bruce A. Chitiea wrote:
I've successfully coded the same critical piece of a tiny, single
user development database both ways.
In your experience, are there any performance advantages for one
over the other, were this a live, monster, multi-user database?
Bruce,
Technically, the SWITCH statement is a control statement that handles
multiple selections by passing control to one of the CASE statements
within its body.
The SWITCH statement allows the developer to control the order in
which the codes are executed because it is a "conditional" statement.
Nested "IF statement" can be rewritten as one SWITCH statement.
The SWITCH and CASE keywords evaluate expression and execute any
statement associated with constant-expression whose value matches
the initial expression.
Last but not least, to optimize the code, ALWAYS type the BREAK
keyword at the end of each condition otherwise the compiler will
execute every 'CASE' statement even if only one condition is met.
Have fun!
Very Best R:egards,
Razzak.
www.rbase.com
www.facebook.com/rbase
--
32 years of continuous innovation!
17 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--