× 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: ILE RPG:Is the use of ITER & LEAVE Structured Programmin
  • From: ericadelong@xxxxxxxx
  • Date: Thu, 23 Apr 98 10:44:31 -0500


Frank,

Personally, I _DO_ think of ITER and LEAVE as structured programming ops. To me,
one of the primary benefits of structured code is readability of program logic, 
not that they perform similarly to non-structured ops like GOTO/TAG. 

As an example, Do loops are considered to be structured opcodes. Consider the 
following:
C             DOU        (FldXXX = 'A')
C             chain      xxxx             95
C  95         leave
C             .... 
C             ENDDO

This code performs the same as above but is unstructured:
C     LOOP1   TAG
C             CHAIN       xxxx            95
C  95         GOTO  EXIT1      
C             ....
C     FLDXXX  COMP  'A'                   96       (=)
C  96         GOTO  LOOP1       
C     EXIT1   TAG

I don't think it's fair to say that just because an opcode seems similar to 
GOTO/TAG that it is not "structured". I can't think of a single "structured" 
opcode that I could not simulate with various GOTO/TAG, COMP, etc.

This bring up another point. I have seen code written with "structured" ops that
were anything but structured.  This programmer refused to use use 
"nonstructured" opcodes and, IMO, he suffered greatly for it.  To me, structured
programming is as much a design issue as it is a coding issue. The goal is to 
produce code that is efficient and readable. 

Well, enough of that.... :) Gotta go.....

Eric A DeLong
ericadelong@pmsc.com

______________________________ Reply Separator _________________________________

     
     Hi Folks,
     
     I was just looking at a printout from the News400.com website about 
     RPG ILE (tips and techniques). I belive the text was authored by  
     Bryan Meyers. However he mentioned the use of ITER and LEAVE in the 
     context of structured programming. 
     
     I suppose I am a purist and I ensure that these opcodes are not part 
     of any new development that we produce. IMHO these opcodes are GOTO's 
     without TAGs and are not structured programming. I'd love to hear 
     other opinions on this. And what is a strict defination of Structured 
     programming.
     
     Regards,
     
     Frank Meaney.
     (Unisoft Systems Ltd)
     


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