If all the inner expressions are all negative, then it's often easier to understand with the NOT on the outside.

I find the second one of these two statements easier to understand at a glance:
- if x <> 1 and not %found
- if not (x = 1 or %found)

If the inner expressions are a mixture of positive and negative, then "it depends" whether it's nicer to put the NOT on the outside.

I can't decide which one is "better" of these two, but I'm leaning towards the first, maybe because of the double NOT in the second one.
- if x <> 1 or %found
- if not (x = 1 and not %found)

Good old "De Morgan's Law".

On 2019-02-27 11:54 AM, Robert Rogerson wrote:
Jeff, I too use that logic often.  It drives my boss nuts but to me it just makes sense...


On 2/27/2019 9:23 AM, Jeff Crosby wrote:
Don't laugh at me either -

Is this valid

if not ( SML010 <> 5 and M1PLIN = *blanks);

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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