It's shorter.

Consider this case:

if MyLongVariableWhoseNameIsVeryLong=1 then
'Do something
elseif MyLongVariableWhoseNameIsVeryLong=2 then
'Do something else
elseif MyLongVariableWhoseNameIsVeryLong=3 then
'Do something else
else
'Do anything
end if

or this case:

select case MyLongVariableWhoseNameIsVeryLong
case 1
case 2
case 3
else
end select

You don't repeat the variable every time. Even if the variable name  
is not too long, if you later decide to change the name, you change  
it once instead of for every if.
You also avoid having "then" at each end.

Le 1 mai 07 à 18:43 Soir, Rubber Chicken Software Co. a écrit:

> Why do I see various uses of Select Case, when If-End If works just  
> as well?
>
> I'm so used to If-End If, that I never see the reason for Select Case.
>
> It exists, so there must be a reason. What is it? Or is it just
> historical or pandering to different preferences?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to