I've seen this "GOTO by another name" argument a few times
in this thread. Doesn't it logically follow then that loops
and other branch statements (SELECT-WHEN, IF) are also bad?

You seen to be implying I think GOTO is inherently bad. I don't believe
that's true. It all depends on the usage. I just want the advocates of the
ITER/LEAVE operations to recognize these commands for what they are,
dressed up GOTOs.

Steve

Steven Morrison
Fidelity Express
903-885-1283 ext. 292




Adam Glauser <adamglauser@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/09/2009 11:37 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
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






smorrison@xxxxxxxxxxxxxxxxxxx wrote:
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!

I've seen this "GOTO by another name" argument a few times in this
thread. Doesn't it logically follow then that loops and other branch
statements (SELECT-WHEN, IF) are also bad?

FWIW, I also dislike CABxx, but that has more to do with my preference
for subprocedures over subroutines. I also try to avoid ITER and LEAVE
where possible, but I think that they can make code more readable in the
"loop completion is the exception" cases that James mentioned. In those
cases I find that putting all the logic in the loop's logical expression
tends to make the expression overly complex.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.