× 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've always struggle with the concept that: using return opcode to exit 
subprocedure in the mid of subprocedure is bad thing.

I do not see a problem of coding something like this: 

p mySubProd             B
D                 pi
D record                                        likeDS(recordDS)
 
 * only process certain type of record
C                       if      record.type <> "xxx"
C                       return 
C                       endif

 * only process if user is auth to this record
C                 if    not isAuth(record)
C                 return 
C                 endif

 * other checking before process
C                       . . . . 


 * process it
C                       . . . .

p mySubProd             E


Of course, return is like goto, it can be misuse easily.


----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Joe Pluta
Sent: Wednesday, July 27, 2005 9:11 PM

<clip>
And procedures can be misused most horribly.  One of the worst offenses
I see is procedure with a bunch of return opcodes strewn throughout it.
At least with a subroutine you can stick a breakpoint on the ENDSR and
know it will get there.
</clip>


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.