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



Cyndi Bradberry wrote:
C TTBAST IFNE 'D'
C TTA9CD ANDNE '001'
C TTA9CD ORNE '002'
C TTA9CD ORNE '003'
C TTA9CD ORNE '012'
C TTA9CD ORNE '013'
C TTBAST ORNE 'H'
C TTA9CD ANDNE ' '
C MOVE TTOFCD OFCD 2

We have run across this code in a very old program we are trying to
bring into the current century.

If you were to rewrite this using parenthesis.....how would you group
things ? We dragged out the manual on the order of resolving equations,
but it really doesn't help us much.
If I were to rewrite this, I'd write:

OFCD = TTOFCD;

Huh? No IF? No, no if.

Because each group separated by OR is evaluated separately, and the code is executed if any group evaluates to true. Now, check carefully: two of the groups are TTA9CD NE 002 and TTA9CD NE 003. If you think about it a moment, you should see that one of those is ALWAYS true (and sometimes both). TTA9CD can neverbe both 002 and 003, so one of the NE tests will fail.

This code is a big, huge, IF 1 = 1.

Joe

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.