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



Just another small example....

If you try to please the masses, it only causes mass confusion....

All in all as long as the code is easy to understand & performs
correctly (& efficiently) who cares??

Most of the things I've seen come through this list lately are
preferential debates, not really helpful!

For someone who came here with a basic need or question, they most
likely leave with a solution & a migraine!!

Basically in a nut shell, if we can solve the querant's issue that's
lovely.  If they understand WHAT the solution is even better.  If we
innundate them with 1,000's of "use this" or "use that" we are more
likely causing more issues than we're solving.  

DISCLAIMER:
This is not an attack on anyone nor should it be interpreted as such.
There are a lot of great minds at work here (I'm not including myself
here, I'm a proud mental midget...), but remember most folks can't
understand Einstein...nor could they debate with him on the Theory of
Relativity!!!

 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Paul Morgan
Sent: Monday, August 22, 2005 9:18 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: read on a do loop

Rob,

It always bugs me when I see someone using a SELECT statement with one
WHEN clause when a perfectly good IF statement would work.  You're using
two statements (SELECT/WHEN) to do the work of one statement (IF).

When there is another option then I'd code a SELECT or ELSEIF.  Using IF
doesn't stop me from thinking about a third option.  I'll use ELSEIF if
the ELSEIF was on another variable:

If A = 'XYZ';
ElseIf B = 50;
EndIf;

I'll use SELECT if all the conditions are on the same set of variables
(a truth table):

Select;
When A = 'XYZ';
When A = 'QRS';
EndSl;

Paul

--
Paul Morgan
Senior Programmer Analyst - Retail
J. Jill Group
100 Birch Pond Drive, PO Box 2009
Tilton, NH 03276-2009
Phone: (603) 266-2117
Fax:   (603) 266-2333

Rob wrote

> I find myself thinking the same way about if's versus select.
> Every time I think I have a single case if I come up with 'the third 
> option'.  I've pretty much made it another mantra to always use select

> instead of if.
> 1 - Nested if's are bug ugly.
> 2 - Using select makes you think about 'the third option'.



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.