×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Yes, David, the extended form lets you use all the parentheses you need to organize your conditions - it's time to get rid of all those *EQ *NE opcodes and just use WHEN or IF or whatever.

Welcome to conditional Nirvana!

Vern

On 11/10/2010 6:33 AM, David FOXWELL wrote:
Thanks Joep, I never really learned the extended fixed form of RPGIV.


-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de
J.Beckeringh@xxxxxxxxxxxxxxxxxxxxxxxxxx
Envoyé : mercredi 10 novembre 2010 10:44
À : RPG programming on the IBM i / System i
Objet : Re: How to read and or statement

David,

If you want to 'stay in style' you need:

C *INKF WHENEQ *ON
C CONDITION1 ANDEQ FALSE
C *INKF OREQ *ON
C CONDITION2 ANDEQ FALSE

But why don't you use:
C WHEN *INKF AND (CONDITION1=FALSE OR
CONDITION2=FALSE)

Joep Beckeringh


David FOXWELL

Consider this code :

C *INKF WHENEQ *ON
C CONDITION1 ANDEQ FALSE

*If I add :
C CONDITION2 OREQ FALSE


I think this now means :

IF (*INKF AND CONDITION1=FALSE) OR (CONDITION2=FALSE)

But I want :
IF *INKF AND (CONDITION1=FALSE OR CONDITION2=FALSE)

Which is right?

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



This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.