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



I guess it's a matter of personal preference and it's a lot easier to do if
you're writing something from scratch, but if you want to avoid LEAVE, ITER,
and GOTO there are ways to do it.  RPG has a wonderful case statement.  If
you have a situation where something has to pass every one in a list of
logical tests you can exploit short circuit evaluation of things anded
together.  If the tests are complicated, you can make them procedures that
return a logical value.

OTOH, if I'm adding a condition to a program that has long series of cond
ifxx val, goto tag things, I don't try to "reform" it.  <g>

> -----Original Message-----
> From: Andrew Borts [mailto:Andrewb@SETACORPORATION.com]
> Sent: Thursday, December 06, 2001 7:26 AM
> To: rpg400-l@midrange.com
> Subject: RE: Why is LEAVE bad? (was: Cycle Processing vs. Doing it my
> way)
>
>
> To write 10,000 lines of code to avoid a goto/leave/iter/leavsr verses
> putting a leave in place to pop out of a loop, go to the top
> of a loop,
> or leaving a subroutine is a little pointless.  One line of code to
> avoid those hassles.  At the same time, I approached a person with a
> programming problem 6 years ago - I would have had to
> re-write the logic
> of the program, the client said simply "why not put a goto
> from there to
> there" - 2 lines of code, and 10 minutes later I was done.
>
> As far as cycle verses putting the logic in yourself - I
> maintain - "it
> depends"
>
> Read's verses reade are a same argument.  If you Setll then read and
> check the "level" yourself, the system buffers chunks of data for that
> are read.  Reade positions every time.  Using the cycle
> probably buffers
> like mad since it can spin through the data.  20 lines of code later,
> and you can convert the world with a cycle program.
>
> Oh and so everyone knows, I'm 35, and in the industry since I'm 23 (12
> years!) (since it's reveal how old you are and how long your in the
> industry week on RPG-L)
>
>
> Andrew Borts / Webmaster
> Seta Corporation
> 6400 East Rogers Circle
> Boca Raton, FL 33499
>
> E-mail: Andrewb@setacorporation.com
> Corporate web site http://www.setacorporation.com
> E-Commerce web site http://www.palmbeachjewelry.com
>                               http://www.myfreeitems.com
> Voice: 561-994-2660 Ext. 2211 / Fax: 561-997-0774
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.