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



Dennis,

I make a point of (generally, not always) having a subroutine called return.
In my code, I will code an 'exsr return' instead of simply the RETURN
opcode, even though the 'return' subroutine may contain no more than the
RETURN op-code.

Why?

It's my preferred way of doing things. Sometimes, there is cleanup to be
performed, completion messages to be sent, files to be closed, return codes
to be set. Yes, I could have these lines of code duplicated throughout the
program, immediately prior to a RETURN statement, but that means
duplication, which means more chance of errors.

As Joe said in an earlier post, we each have our way of doing things, which
may not immediately be clear to others, but which may well have benefits
which they don't immediately see. Once I explain my method to other
developers, they often decide to use it, since if they subsequently add code
which may require an exit from the program, they can simply say 'EXSR
RETURN' and *know* that all required return processin will be performed.
Yes, it hides the RETURN from the maintainer more effectively - THAT'S THE
WHOLE POINT.

Be careful of calling things lazy and ugly.

Rory

On Tue, Mar 2, 2010 at 2:24 AM, Dennis Lovelady <iseries@xxxxxxxxxxxx>wrote:


And as far as that EXSR GET OUTNOW argument... that just hides the RETURN
from the maintainer more effectively. It is lazy, ugly, and asking for
trouble down the road (when the author is at some other job, creating new
problems for new followers).


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.