× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Tue, Sep 10, 2019 at 11:20 AM Åke Olsson <konsult@xxxxxxxxxxxxxxx> wrote:

I definitely prefer SELECT-WHEN every time for two reasons:
1. If you have a group of mutually exclusive cases and need to change the
program at some point it is much easier to do this with a select clause.

The only situation where ELSEIF is harder to change than WHEN, from a
purely logical standpoint, is where you need to remove the first
condition. For that, you have to "promote" the first ELSEIF into an
IF. In all other respects, the actual amount of editing you need to do
is exactly the same.

2. Readability! Only one opening statement and one closing (endsl) for the
whole thing.

Readability is subjective, but if you find SELECT easier to read, then
that is a good enough reason to use it. I suspect that the only reason
you feel SELECT is easier to edit is that you find it easier to read.
Which is perfectly valid and fine.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.