× 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: Francis Lapeyre <flapeyre@xxxxxxxxxxxxxx>
  • Date: Tue, 27 May 1997 19:18:42 -0500
  • Organization: Communiqué, Inc. User

Susan Durrie wrote:
> 
> On May 26, 1997, David Kahn replied as follows:
> 
> >On May 25 1997 John P. Carr wrote:
> 
> >Ok David; (Mr Phelps)
> >
> >Here's your assignment if you chose to accept it, Convert the following
> >code of that infamous DOU connoisseur guy  John Carr to a DOW.
> 
> >Like this, you mean?
> 
>   KEY       CHAINFILEXXX              90
> 
>   *IN90     DOWEQ*OFF
>   XXCODE    ANDNE'B'
> 
>   XXCODE    IFEQ 'A'
>             ITER
>             ENDIF
> 
>  <.... whatever process ....>
> 
>   KEY       READEFILEXXX                  90
>             ENDDO
> 
> Correct me if I'm wrong, but if XXCODE='A', aren't you in an
> infinite loop?
> 
> And just to stir up trouble, I'll throw in the following that I
> use in certain circumstances:
> 
>    KEY       CHAINFILEXXX              90
> 
>   *IN90     DOWEQ*OFF
>   XXCODE    ANDNE'B'
> 
>   XXCODE    CABEQ'A'     NXTRCD
> 
>  <.... whatever process ....>
> 
>   NXTRCD    TAG
>   KEY       READEFILEXXX                  90
>             ENDDO
> 
> Just could not resist throwing my two cents worth in on this one.  I'm
> new to the mailing list; subscribed on the advice of Charlie Massoglia
> after attending one of his excellent seminars.  The rewards have been
> well worth the time expended.
> 
> Susan Durrie

If XXCODE=A, you won't be in an infinite loop. Unlss, of couse, XXCODE
is never modified in the body of the loop. Eventually, the file will
end, *IN90=*ON, and you're out of the loop.

I try to avoid the use of TAGs, also, I'd condition the loop on the EOF
indicator alone. Any other conditions should be inside the loop proper,
with ITER or LEAVE, as appropriate, for a "no-hit". I don't like the use
of two READ statements in a loop; with some sloppy coding I've seen, you
have to stop and think.. "Is this ANOTHER loop, or the same one?" I hate
having to compile the thing just o get a listing so I can see how it's
structured.

Too many GOTO's lead to "spaghetti" code, a tangled mess for the next
poor fellow who has to work on it. Pass the Parmesan.

-- 
Francis Lapeyre                    flapeyre@communique.net
----------------------------------------------------------
"The probability of life originating from accident is 
comparable to the probability of the Unabridged Dictionary
resulting from an explosion in a printing factory." 

Prof. Edwin Conklin

****** If you spam me, you will incur the wrath of your Internet **
****** Service Provider. I KNOW who you REALLY are!!***************

Opinions are my own. Otherwise, they are someone else's.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 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-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.