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



Well????
Maybe not. :)
NOT is supposed to be done last, but... I haven't had the need to test
is, since I'm always using parens "to be certain" the logic is the way I
think it should be.

So, what we're asking is this....

              if           NOT *IN99 and *IN98 and *IN97
The same as...
              if           NOT (*IN99 and *IN98 and *IN97)

Or the same as this...
              if           (NOT *IN99) and *IN98 and *IN97

I suppose a test is in order.

Bob

-----Original Message-----
From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]
On Behalf Of Richard B Baird
Sent: Monday, December 02, 2002 2:26 PM
To: rpg400-l@midrange.com
Subject: RE: notted boolean expressions (was: output specs and
indicators)



Bob,

Bob said:
> The caveat is that the NOT'ed indies need to either be put into
> parens, placed at the end of the expression. eg.
>              if           (NOT *IN99) and *IN98 and *IN97

Is that right?   are you saying that without the (), the not applies to
all
of the boolean expressions in the if statement?

I have a working piece of code that goes as follows:

  if        (not Dwildcard           and
                 hrmDir <> *blanks   and
                 hrmDir <> ListName)
..do something..
  end

notice, the 'not' on the boolean (n) variable, combined with compares
(which resolve to a boolean yes or no, correct?)  if I get what you are
saying, then what the above really means is:

  if         not (Dwildcard and hrmDir <> *blanks and hrmDir <>
ListName)
?

and how about this?

    if        not Fwildcard   and
              not Dwildcard
.. do something...
    end

if the beginning 'not' applies to all the boolean expressions in the
statement, does it reverse the second 'not'?  or does it mean:

    if        not (Fwildcard and not Dwildcard)
?

until just now, I didn't think this was such a hard concept to
understand. now i'm so confused.... ;)

rick

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@midrange.com To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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 ...

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.