|
I would probably do it that way as well, but it is not exactly the
same, since the first statement contained a WHEN.
If *INKF were off or both condition1 and condition2 were on, the next
WHEN statement would be executed.
Albert
On Wed, Nov 10, 2010 at 12:14 PM, Scott Klement
<rpg400-l@xxxxxxxxxxxxxxxx> wrote:
Shrug... I wrote complex logical expressions in RPG III.. I justdidn't
intermix AND/OR the way David demonstrated.would
I'd do something more like this:
C *INKF IFEQ *ON
C CONDITION1 IFEQ FALSE
C CONDITION2 OREQ FALSE
...
C ENDIF
C ENDIF
That way, I didn't get confused by which one took precedence...
starting a new IFxx statemnet controlled my precidence.
But I much prefer having parenthesis, and I can't see why someone
use the godawful IFxx/ORxx/ANDxx stuff today.ago
On 11/10/2010 9:25 AM, Jon Paris wrote:
It is exactly these kinds of problems that convinced me many years
RPGthat nobdoy ever wrote even mildly complex logical expressions in
forIII.
But many millions were debugged!
Jon Paris
www.Partner400.com
www.SystemiDeveloper.com
On Nov 10, 2010, at 9:43 AM, rpg400-l-request@xxxxxxxxxxxx wrote:
heh heh... You answered your own question, and you made the case
agiving up the old style.
Why not try the code, just as you want it (except change the if to
mailing listwhen), and see if it works?
--
This is the RPG programming on the IBM i / System i (RPG400-L)
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.
This is the RPG programming on the IBM i / System i (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 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.