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



Kurt,

Layout in the source doesn't change anything at runtime.

I like to keep my internal (non-exported) procedures at the bottom (and I
typically name them with an 'i_' prefix, e.g. i_setFlags). That way, at
least someone who is going over my source won't have to page through a bunch
of internal stuff which has (hopefully) been tested to death and therefore
isn't the cause of the bug they're trying to fix. Likewise, if any of the
prototypes are defined in the module code (again, for internal procedures
only), those will be in the same order as the procedures themselves.

If I know that my module will eventually become a single-module *SRVPGM,
I'll put them in the same order as they are exported from the service
program, but again, that's simply a matter of convenience. If I need to add
any procedures, they can at least go after all the others, since they will
go at the end of the *SRVPGM export list.

Rory
On Wed, Nov 12, 2008 at 2:49 PM, Kurt Anderson <kurt.anderson@xxxxxxxxxxxxxx
wrote:

Hi all,

I'm just curious how people lay out their subroutines and subprocedures
in a program, and why?

I've always done it (subprocedures, I don't do much with subroutines)
alphabetically - mainly because the outline will not alphabetize them -
and they're a pain to find otherwise. I believe the outline does
alphabetize subroutines (for whatever reason).

Location of a subprocedure/subroutine in a program doesn't affect how it
runs, right?

Thoughts?

Thanks,

Kurt Anderson

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.