× 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.



Can you explain what you mean by #1? I can't see how it would make a difference, SELECT vs ELSEIF.

-----Original Message-----
From: Åke Olsson [mailto:konsult@xxxxxxxxxxxxxxx]
Sent: Tuesday, September 10, 2019 10:14 AM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: IF..ELSEIF vs SELECT (Ake Olsson)

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.

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

- When coding anything: Code for the person that will need to maintain this ten years from now. It may be yourself -




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.