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



That is a maintence nightmare for most new programmers. Lets code an
endless loop and make you figure out when I want to terminate it with the
leave.

IMHO,1 should never code an endless loop DOW 1 = 1......not very
documenting
2 Leave and Iter are limited varations of a GOTO, but not
GOTOS themselves. I can make a GOTO/TAG do the same thing as a Iter or
Leave ( would that be ok then?)

dow 1 = 1
read file
if eof
Goto End
endif
... processdata
enddo
Tag End

3 Leave and Iters just show that the programmer didn't want or
have the time to properly figure out the loop termination points


Jeff Davis
Programmer
Dental Network of America
2 Transam Plaza Drive, Suite 500
Oakbrook Terrace, IL. 60181
630.691.0336




"Jeff Crosby" <jlcrosby@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/09/2009 12:38 PM
Please respond to
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Good places to use "The Cycle" in today's RPG was->Re: FW: Niftiest
thing(s) you have done in RPG ILE or /FREE






I do it the way you don't.

dow '1';
read file;
if eof;
leave;
endif;
processdata;
enddo;

That's MY opinion and I'm sticking to it. <g>


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.