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



On 2017-07-19 5:14 PM, Dan wrote:

Any new code I add to existing programs is free-format, and it's not
unusual that a GOTO is required in the middle of it because of the way the
rest of the code is architected. I'm just glad we don't need the /free &
/end-free directives any longer, cuz that would be really ugly.


If code has downward-only GOTOs to a single TAG, often you can move all the code containing the GOTOs and the TAG into a subroutine and then use LEAVESR instead of the GOTOs.

some irrelevant code A.
some code B.
C goto endtag
some more code C.
C goto endtag
yet more code D.
C endtag tag
some more irrelevant code E.

Change to
some irrelevant code A.
exsr do_whatever;
some more irreievant code E.

begsr do_whatever;
some code B.
leavesr; // was goto endtag
some more code C.
leavesr; // was goto endtag
yet more code D.
endsr; // was endtag tag

I think the only time there's no other way around coding a TAG statement is for the SQL WHENEVER statement.


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.