Hi Dick,
Both Switch(in C) and SELECT(in Clist/Rexx) are used to avoid multiple IF-ELSE statement. i don’t say they are exactly same but they are similar
switch( expression )
{
case constant-expression1: statements1;
[case constant-expression2: statements2;]
[case constant-expression3: statements3;]
[default : statements4;]
}
SELECT [test expression]
WHEN expression1 ...
(action) ...
WHEN expression2
WHEN expression3
[OTHERWISE] ...
( action) ...
END
When the test expression is used in the SELECT it is similar to SWITCH (with BREAK statement is used in all the CASE in switch)
Pls correct me if i am wrong..