× 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: DOW vs DOU
  • From: Bob Larkin <blarkin@xxxxxx>
  • Date: Sun, 01 Jun 1997 17:37:44 -0700
  • Organization: Larkin Computer Consulting

Brian Johnson wrote:
> 
>  ----------
> From:  Rick Baird
> Sent:  Thu, May 29, 1997 20:58 PM
> Subject:  Re: DOW vs DOU
> 
> Since were on the subject, I would like some opinions on a coding
> technique that I've been using for several years now.  I use the LEAVE
> and ITER opcodes extensively as a sortof GOTO replacement (ooh, maybe
> 
> ...(cut)...
> 
> Sort of GOTO?  ITER and LEAVE are *exactly* GOTO's, crutches for folks
> who don't *get* structured programming.  Stop using them!  Learn how to
> write structured programs!  Take a class!
> 
> Well, sorry, but that's my opinion.  Now that I've got that off my chest,
> here's an approach that avoids GOTO, ITER and LEAVE:
Oh boy, this is going to be fun. Here is my radical opinion on GOTO.

STRUCTURED PROGRAMING IS NOT "GOTO-LESS" PROGRAMMING.
By definition, A Structurded program has only one entry point, and one
exit point.
Taking this to a lower level, each module (paragraph, procedure,
subroutine), will have one entry and one exit point.

If a "GOTO" (or it's equivalent ie. LEAVE) branches to the exit of the
module, it is still structured! 

If a GOTO prevents you from having a structured program, so will an IF,
DO, CAS, etc.
Because all these are tests that cause what?, A goto to a location where
the code to be executed resides!

I wish I could find a communication program I wrotew on the S/38 to
communicate with an LU1 device on a mainframe. Writing "Structured" code
resulted in almost unreadable, and in-efficient code. Judicious use of
GOTOs lead to a clearly readable program, with greater efficiency.  All
GOTOs were to the exit of a paragraph (Sorry, this program was in COBOL,
but the same holds true for RPG)

That's my story, and I'm stickin' to it.
-- 
Bob Larkin
Larkin Computer Consulting
blarkin@wt.net
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 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 MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  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.