|
I am amazed at the number of people who say that ITER and LEAVE are good op-codes, but GOTO is a nasty op-code! What do you think ITER and LEAVE are, except a fancy GOTO without an explicit TAG? I felt the same way about CABxx (Case and Branch) when that was the popular new op-code!
Steve
Steven Morrison
Fidelity Express
James Lampert <jamesl@xxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/09/2009 10:40 AM
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
GUY_HENZA@xxxxxxxxxxxxxx wrote:
I was taught structured programming in 1980 and I have never writtena new
program with a GOTO, ITER or LEAVE. I consider them to be poorprogram
design.
Hmm. Sounds like you were taught by a fanatical disciple of Wirth.
There is nothing inherently bad about ITER or LEAVE, provided they are used in situations (e.g., brute-force table look-up) in which premature exit of a loop is the norm, and completion of the loop is the exception.
As an Amazon Associate we earn from qualifying purchases.
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.