× 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: rbbaird@xxxxxxxxxxx (Rick Baird)
  • Date: Fri, 30 May 1997 20:23:07 +0100
  • Organization: Premium Systems, Inc.

Brian Johnson wrote:

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

yeah, but... yeah, but.....  
I know you are but what am I?....  I know you are but what am I?.....  

(lashing out instead of defending myself  :)

> 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:
> 
> C       F1DISP     BEGSR
> C                  EXSR  F1INZ             (any pre-screen processing)
> C                  EXFMT FMT1
> 
> C       *INKC      DOWEQ *OFF              (leave loop if F3 or F12 is
> C       *INKL      ANDEQ *OFF                pressed)
> 
> C                  SELEC
> C       *INKD      WHEQ  *ON
> C                  EXSR  F1PRMT            (prompt/lookup inquiry calls)
> 
> C                  OTHER
> C                  EXSR  F1EDIT            (input field editing)
> C       $ERROR     IFEQ  *OFF
> C                  EXSR  F1UPDT            (file update)
> C                  EXSR  F1INZ             (any pre-screen processing)
> C                  ENDIF
> C                  ENDSL
> 
> C                  EXFMT FMT1
> C                  ENDDO
> 
> C                  ENDSR

Nice.  I'm still not sure I like the primeing exfmt, but it's growing on
me.

I don't like the compound dow though.  As complexity function and
versitily is added, there might be 5 or valid reasons to leave the loop
- 
see a previous post explaining the point of my technique - not to create
the perfectly structured do loop, but to make it very easy to know
exactly what happens next without having to page back or forward and
double check the do conditions.

> 
> C       $ERROR     IFEQ  *OFF
> C                  IF (some error condition)
> C                  MOVE  *ON       $ERROR
> C                  ENDIF
> C                  ENDIF
> 
> C       $ERROR     IFEQ  *OFF
> C                  IF (some error condition)
> C                  MOVE  *ON       $ERROR
> C                  ENDIF
> C                  ENDIF

I hate having to continually re-iterate (so to speak) the error
condition each time.  maybe a little anal on my part, but it is so.

Thanks again for the critiques.  All are very different from each other
and all have their merits and weaknesses (including mine).  

regards,

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

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.