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


  • Subject: Re: Structured RPG ? - Was ITER/LEAVE
  • From: ericadelong@xxxxxxxx
  • Date: Tue, 28 Apr 98 09:26:42 -0500


John, 

IMO, I'd prefer the following:

                IF          ((Amt_Due >0) and 
                             (Payment >0) and        
                             (Chk_Amt >0))

                exsr        Do_Payment
                ENDIF

The only real difference from your last example is just presentation. To me, the
use of symbolic shorthand in logical constructions is confusing and potentially 
dangerous. I also prefer to code only one boolean op on a line so that the 
expression can be changed/added to without needing to cut and paste to make the 
changes fit.
 
Just my opinion......
Eric A DeLong
ericadelong@pmsc.com

______________________________ Reply Separator _________________________________

     
Hi all
I think these are both examples of "What would you do if you  were in
 a dark alley, in a bad section of town, and ....."
     
There is no good answer.   You have to look back upstream for the answer. 
Why do you have three Indicators defining some condition as variable 
flags.   The structure and read-ability has already been compromised. 
     
Can either one of the above provide lucidity on whats going on there?? 
Is there more information about the decision being made than is being 
shown?
     
Curious, Which one of these is more readable?? Whats everyones opinion? 
     
-----------------------------------------
        Amt_Due                IFGT        0        
        Payment                ANDGT        0 
        Chk_Amt                ANDGT        0
                        EXSR        Do_Payment
     
                        Endif
                        Endif        
                        Endif
     
or this --------------------------------------------------
     
                        IF        ((Amt_Due >0) + (Payment >0) +        
                                 (Chk_Amt >0))
     
                        EXSR        Do_Payment
                        Endif
     
With writing it one of these ways,  Not only do you know that something 
will be done if these three conditions are true,  BUT you also know this 
is most likely dealing with money and something to do with payments.  
     
     
These add tremendous leveraging power to the Maintenance/Enhancement 
capability of your staff as well as the application base.
     
Things won't break as often from a mis-diagnosis of the problem and have 
the fix break more than the fix.
     
Just Curious.  Which of the 4,  people like better?
     
John Carr
     
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. 
| Questions should be directed to the list owner/operator: david@midrange.com 
+---
     


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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