× 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 think there's some risk of becoming pedantic about procedures vs.
subroutines. You can become overly concerned, even ostentatiously concerned
about replacing subroutines with procedures. I see evidence of that
attitude. I have written thousands of procedures and hundreds of service
programs. But I still use subroutines to enhance readability of code. One
common example is to use a subroutine to separate record processing from a
record read loop.

read record;

dow not %eof();
exsr process-record;
read record;
enddo;

I'm also not comfortable with the term "global" vs. "local" to define
variable scope. You might distinguish rather between variables scoped to a
procedure, a module, or even data exports and imports which are shared
between programs and service programs within an activation group. Be more
precise about describing the scope of variables.

Use subroutines to block code for readability. Use procedures and service
programs when you need a routine to return a value, and when the routine
will be called from multiple programs or service programs.

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.