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



Swap position of the conditions:
dow myvariable <> 'A' and myvariable <> '';

Perhaps RPG employs "short circuit" evaluation. In your condition below
myvar is <> '' is already true ('A' <> '') so does not need to compare to
'A'. This switch makes the more restrictive condition be evaluated first
(unless optimization is in effect).

Or invert the logic:

dow not (myvariable = '' or myvariable = 'A');

HTH,
Loyd

On Fri, Jun 12, 2009 at 3:13 PM, Bryce Martin <BMartin@xxxxxxxxxxxx> wrote:

Ok Group. I have run into an interesting problem...

I have this loop structure...

dow myVariable <> '' and myVariable <> 'A';
// I do some stuff
// At some point myVariable could be set to '' or A or another value
// at which point we want to run the loop again.

enddo;

But when myVariable = 'A' the loop runs anyway.

Can we not put multiple conditions on a DOW loop? Is my brain not reading
my logic correctly today?




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.